Update Dockerfile
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
|
@@ -16,6 +16,14 @@ RUN apt-get update && apt-get install -y \
|
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
COPY . .
|
|
|
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
COPY requirements.txt .
|
| 19 |
+
|
| 20 |
+
# Install Torch for CPU first (to avoid dependency issues with detectron2)
|
| 21 |
+
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
| 22 |
+
|
| 23 |
+
# Install Detectron2 with CPU flags
|
| 24 |
+
RUN FORCE_CUDA=0 pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git'
|
| 25 |
+
|
| 26 |
+
# Install the rest of the requirements
|
| 27 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
|
| 29 |
COPY . .
|