Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
|
@@ -13,8 +13,15 @@ WORKDIR /app
|
|
| 13 |
|
| 14 |
# ---- Python dependencies ----
|
| 15 |
COPY requirements.txt /app/requirements.txt
|
| 16 |
-
RUN pip install --no-cache-dir --upgrade pip
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# ---- Pre-download the model at build time ----
|
| 20 |
# This bakes the model weights into the image so the container starts
|
|
|
|
| 13 |
|
| 14 |
# ---- Python dependencies ----
|
| 15 |
COPY requirements.txt /app/requirements.txt
|
| 16 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 17 |
+
|
| 18 |
+
# Install torch from the CPU-only wheel index first. This avoids pulling
|
| 19 |
+
# in the ~2GB of NVIDIA CUDA/cuDNN packages that the default PyPI wheel
|
| 20 |
+
# depends on, which are useless (and wasteful) on this CPU-only Space.
|
| 21 |
+
RUN pip install --no-cache-dir torch==2.3.1 --index-url https://download.pytorch.org/whl/cpu
|
| 22 |
+
|
| 23 |
+
# Install the remaining Python dependencies.
|
| 24 |
+
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 25 |
|
| 26 |
# ---- Pre-download the model at build time ----
|
| 27 |
# This bakes the model weights into the image so the container starts
|