Spaces:
Sleeping
Sleeping
Commit ·
91a9877
1
Parent(s): 15b7ca5
Update Dockerfile for CPU-only environment
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
# Set environment variables to non-interactive
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
@@ -28,6 +28,9 @@ ENV PATH="/home/user/venv/bin:$PATH"
|
|
| 28 |
COPY --chown=user requirements.txt .
|
| 29 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
|
|
|
|
|
|
|
|
|
| 31 |
# Copy application files
|
| 32 |
COPY --chown=user app.py .
|
| 33 |
|
|
|
|
| 1 |
+
# Use a standard Python base image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Set environment variables to non-interactive
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
| 28 |
COPY --chown=user requirements.txt .
|
| 29 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
| 31 |
+
# Add a comment about installing CPU-only dependencies here if needed for the full application
|
| 32 |
+
# e.g., RUN pip install torch==1.x.x+cpu torchvision==0.x.x+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
|
| 33 |
+
|
| 34 |
# Copy application files
|
| 35 |
COPY --chown=user app.py .
|
| 36 |
|