Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -13
Dockerfile
CHANGED
@@ -1,23 +1,21 @@
|
|
1 |
-
#
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
#
|
11 |
COPY requirements.txt .
|
12 |
-
|
13 |
-
# Install the Python dependencies
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
#
|
17 |
COPY . .
|
18 |
|
19 |
-
#
|
20 |
-
EXPOSE
|
21 |
|
22 |
-
#
|
23 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "
|
|
|
1 |
+
# Utiliser l'image Python officielle
|
2 |
FROM python:3.9-slim
|
3 |
|
4 |
+
# Installer pandoc
|
5 |
+
RUN apt-get update && apt-get install -y pandoc
|
6 |
|
7 |
+
# Définir le répertoire de travail
|
8 |
+
WORKDIR /app
|
9 |
|
10 |
+
# Copier le fichier requirements.txt et installer les dépendances
|
11 |
COPY requirements.txt .
|
|
|
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# Copier le code de l'application
|
15 |
COPY . .
|
16 |
|
17 |
+
# Exposer le port 7860 attendu par Hugging Face Spaces
|
18 |
+
EXPOSE 7860
|
19 |
|
20 |
+
# Commande pour démarrer l'application, écouter sur le port 7860
|
21 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|