Satyajithchary commited on
Commit
d68e573
1 Parent(s): 8b0d3c7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -11,8 +11,14 @@ RUN apt-get update && apt-get install -y \
11
  libxext6 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Install PyTorch and TorchVision
15
- RUN pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
 
 
 
 
 
 
16
 
17
  # Install Detectron2 from source
18
- RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
 
11
  libxext6 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+
15
+ # Install dependencies including torch first
16
+ RUN pip install --no-cache-dir torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
17
+
18
+ # Then, install other requirements
19
+ COPY --mount=target=/tmp/requirements.txt,source=requirements.txt /tmp/requirements.txt
20
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
21
+
22
 
23
  # Install Detectron2 from source
24
+ RUN pip install 'git+https://github.com/facebookresearch/detectron2.git