2nzi commited on
Commit
b10cf12
·
verified ·
1 Parent(s): 8f2826a

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -17
Dockerfile CHANGED
@@ -1,18 +1,24 @@
1
- FROM python:3.9-slim
2
-
3
- WORKDIR /code
4
-
5
- # Copier les fichiers de requirements
6
- COPY requirements.txt .
7
-
8
- # Installer les dépendances
9
- RUN pip install --no-cache-dir -r requirements.txt
10
-
11
- # Copier le code de l'application
12
- COPY . .
13
-
14
- # Exposer le port
15
- EXPOSE 7860
16
-
17
- # Commande pour démarrer l'application
 
 
 
 
 
 
18
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Installer les dépendances système nécessaires pour OpenCV
6
+ RUN apt-get update && apt-get install -y \
7
+ libgl1-mesa-glx \
8
+ libglib2.0-0 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copier les fichiers de requirements
12
+ COPY requirements.txt .
13
+
14
+ # Installer les dépendances Python
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copier le code de l'application
18
+ COPY . .
19
+
20
+ # Exposer le port
21
+ EXPOSE 7860
22
+
23
+ # Commande pour démarrer l'application
24
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]