Noursine commited on
Commit
cf35d80
·
verified ·
1 Parent(s): 892a2e8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -23,13 +23,16 @@ RUN pip install --upgrade pip
23
  # Install PyTorch CPU version
24
  RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --index-url https://download.pytorch.org/whl/cpu
25
 
26
- # Install Python dependencies
27
  RUN pip install -r requirements.txt
28
 
29
- # Clone Detectron2 (with PointRend configs)
30
  RUN git clone https://github.com/facebookresearch/detectron2.git /detectron2
31
 
32
- # Install core Detectron2
 
 
 
33
  RUN pip install -e /detectron2
34
 
35
  # Add Detectron2 to PYTHONPATH
@@ -38,5 +41,5 @@ ENV PYTHONPATH="/detectron2:${PYTHONPATH}"
38
  # Expose FastAPI port
39
  EXPOSE 7860
40
 
41
- # Start FastAPI app (points to app.py:app)
42
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
23
  # Install PyTorch CPU version
24
  RUN pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --index-url https://download.pytorch.org/whl/cpu
25
 
26
+ # Install other Python dependencies
27
  RUN pip install -r requirements.txt
28
 
29
+ # Clone Detectron2 repo
30
  RUN git clone https://github.com/facebookresearch/detectron2.git /detectron2
31
 
32
+ # Checkout a commit known to work with PointRend
33
+ RUN cd /detectron2 && git checkout 6d9d66b
34
+
35
+ # Install Detectron2 in editable mode
36
  RUN pip install -e /detectron2
37
 
38
  # Add Detectron2 to PYTHONPATH
 
41
  # Expose FastAPI port
42
  EXPOSE 7860
43
 
44
+ # Start FastAPI app
45
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]