Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -20,12 +20,13 @@ COPY requirements.txt /app/requirements.txt
|
|
| 20 |
RUN pip install --upgrade pip && \
|
| 21 |
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
# Installer Detectron2 depuis GitHub (solution officielle)
|
| 24 |
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
|
| 25 |
|
| 26 |
-
# Installer les autres dépendances
|
| 27 |
-
RUN pip install -r requirements.txt
|
| 28 |
-
|
| 29 |
# Copier tout le code dans l'image Docker
|
| 30 |
COPY . /app
|
| 31 |
|
|
@@ -33,4 +34,4 @@ COPY . /app
|
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
# Commande pour lancer ton app Gradio (modifie selon ton script)
|
| 36 |
-
CMD ["python", "app.py"]
|
|
|
|
| 20 |
RUN pip install --upgrade pip && \
|
| 21 |
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
|
| 22 |
|
| 23 |
+
# Installer les autres dépendances (excepté Detectron2 si présent dans requirements.txt)
|
| 24 |
+
# Vous devrez peut-être modifier requirements.txt pour exclure Detectron2 ou utiliser grep pour le filtrer
|
| 25 |
+
RUN pip install $(grep -v "detectron2\|facebookresearch/detectron2" requirements.txt || cat requirements.txt)
|
| 26 |
+
|
| 27 |
# Installer Detectron2 depuis GitHub (solution officielle)
|
| 28 |
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
|
| 29 |
|
|
|
|
|
|
|
|
|
|
| 30 |
# Copier tout le code dans l'image Docker
|
| 31 |
COPY . /app
|
| 32 |
|
|
|
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
# Commande pour lancer ton app Gradio (modifie selon ton script)
|
| 37 |
+
CMD ["python", "app.py"]
|