Noursine commited on
Commit
8cfc605
·
verified ·
1 Parent(s): 93b9840

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -19,16 +19,16 @@ RUN apt-get update && apt-get install -y \
19
  RUN pip install --upgrade pip
20
 
21
  # Install PyTorch (CPU version)
22
- RUN pip install torch==2.1.0+cpu torchvision==0.16.0+cpu --index-url https://download.pytorch.org/whl/cpu
23
 
24
  # Install Python dependencies
25
  RUN pip install -r requirements.txt
26
 
27
- # Install Detectron2 from GitHub
28
- RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
29
 
30
- # Expose FastAPI port
31
- EXPOSE 7960
32
 
33
  # Start the app
34
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7960"]
 
19
  RUN pip install --upgrade pip
20
 
21
  # Install PyTorch (CPU version)
22
+ RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --index-url https://download.pytorch.org/whl/cpu
23
 
24
  # Install Python dependencies
25
  RUN pip install -r requirements.txt
26
 
27
+ # Install Detectron2 from prebuilt CPU wheel (faster than GitHub build)
28
+ RUN pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch2.0/index.html
29
 
30
+ # Expose Hugging Face default port
31
+ EXPOSE 7860
32
 
33
  # Start the app
34
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]