Spaces:
Running
Running
Fix Docker build with local CPU torch version
Browse files- Dockerfile +2 -1
- requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
ENV PYTHONUNBUFFERED=1 \
|
| 4 |
PIP_NO_CACHE_DIR=1 \
|
|
@@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 17 |
|
| 18 |
COPY requirements.txt .
|
| 19 |
RUN pip install --upgrade pip \
|
|
|
|
| 20 |
&& pip install -r requirements.txt
|
| 21 |
|
| 22 |
COPY app.py doubao_alpha.png ./
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
ENV PYTHONUNBUFFERED=1 \
|
| 4 |
PIP_NO_CACHE_DIR=1 \
|
|
|
|
| 17 |
|
| 18 |
COPY requirements.txt .
|
| 19 |
RUN pip install --upgrade pip \
|
| 20 |
+
&& pip install torch==2.10.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
| 21 |
&& pip install -r requirements.txt
|
| 22 |
|
| 23 |
COPY app.py doubao_alpha.png ./
|
requirements.txt
CHANGED
|
@@ -6,4 +6,3 @@ pillow>=10.0.0
|
|
| 6 |
opencv-python-headless>=4.8.0
|
| 7 |
onnxruntime>=1.16.0
|
| 8 |
huggingface-hub>=0.20.0
|
| 9 |
-
torch>=2.0.0
|
|
|
|
| 6 |
opencv-python-headless>=4.8.0
|
| 7 |
onnxruntime>=1.16.0
|
| 8 |
huggingface-hub>=0.20.0
|
|
|