1.0.1
Browse files- Dockerfile +2 -11
- requirements.txt +10 -15
Dockerfile
CHANGED
|
@@ -9,28 +9,19 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
git \
|
| 10 |
wget \
|
| 11 |
curl \
|
| 12 |
-
libglib2.0-0 \
|
| 13 |
-
libsm6 \
|
| 14 |
-
libxext6 \
|
| 15 |
-
libxrender-dev \
|
| 16 |
-
libgomp1 \
|
| 17 |
-
libglib2.0-0 \
|
| 18 |
-
libgl1-mesa-glx \
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
# Copy requirements first to leverage Docker cache
|
| 22 |
COPY requirements.txt .
|
| 23 |
|
| 24 |
-
# Install Python dependencies
|
| 25 |
RUN pip install --no-cache-dir --upgrade pip && \
|
|
|
|
| 26 |
pip install --no-cache-dir -r requirements.txt
|
| 27 |
|
| 28 |
# Copy application code
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
-
# Create necessary directories
|
| 32 |
-
RUN mkdir -p /app/checkpoints /app/temp
|
| 33 |
-
|
| 34 |
# Set environment variables
|
| 35 |
ENV PYTHONPATH=/app
|
| 36 |
ENV TORCH_HOME=/tmp/torch
|
|
|
|
| 9 |
git \
|
| 10 |
wget \
|
| 11 |
curl \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# Copy requirements first to leverage Docker cache
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
+
# Install Python dependencies (CPU-only PyTorch)
|
| 18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 19 |
+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu && \
|
| 20 |
pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
# Copy application code
|
| 23 |
COPY . .
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
# Set environment variables
|
| 26 |
ENV PYTHONPATH=/app
|
| 27 |
ENV TORCH_HOME=/tmp/torch
|
requirements.txt
CHANGED
|
@@ -1,15 +1,10 @@
|
|
| 1 |
-
fastapi
|
| 2 |
-
uvicorn[standard]
|
| 3 |
-
transformers
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
matplotlib==3.8.2
|
| 12 |
-
requests==2.31.0
|
| 13 |
-
python-multipart==0.0.6
|
| 14 |
-
accelerate
|
| 15 |
-
python-multipart
|
|
|
|
| 1 |
+
fastapi
|
| 2 |
+
uvicorn[standard]
|
| 3 |
+
transformers
|
| 4 |
+
opencv-python-headless
|
| 5 |
+
Pillow
|
| 6 |
+
numpy
|
| 7 |
+
huggingface-hub
|
| 8 |
+
requests
|
| 9 |
+
python-multipart
|
| 10 |
+
accelerate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|