Spaces:
Runtime error
Runtime error
Fix OpenCV libGL missing dependency
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
-
FROM python:3.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
# Installer dépendances
|
| 4 |
WORKDIR /app
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
-
# Copier le code
|
| 9 |
COPY . .
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
CMD ["gunicorn", "
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Installer les dépendances système nécessaires pour OpenCV
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
libgl1 \
|
| 6 |
+
libglib2.0-0 \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
+
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
|
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Utiliser Gunicorn pour servir l'app Flask
|
| 17 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|