flakego commited on
Commit
c5dffac
·
verified ·
1 Parent(s): 352e718

Fix Docker build with local CPU torch version

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. requirements.txt +0 -1
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM pytorch/pytorch:2.3.1-cpu
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