Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -20
Dockerfile
CHANGED
|
@@ -1,40 +1,32 @@
|
|
| 1 |
-
# ----------------------------------------------------
|
| 2 |
-
# STAGE 1 : Build (Installation des dépendances)
|
| 3 |
-
# ----------------------------------------------------
|
| 4 |
# Utilisation de la dernière image slim de Python 3.12
|
| 5 |
-
FROM python:3.12-slim
|
| 6 |
|
| 7 |
-
# Définition du répertoire de travail
|
| 8 |
-
WORKDIR /app
|
| 9 |
|
| 10 |
# Installation des dépendances système nécessaires
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
build-essential \
|
| 13 |
curl \
|
| 14 |
git \
|
| 15 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
# Copie du fichier des dépendances Python
|
| 18 |
-
COPY requirements.txt ./
|
| 19 |
|
| 20 |
# Installation des dépendances Python
|
| 21 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
# ----------------------------------------------------
|
| 26 |
-
# Copie de app.py à la racine du WORKDIR (/app)
|
| 27 |
-
COPY app.py ./
|
| 28 |
-
|
| 29 |
-
# CORRECTION : Copie des fichiers CSV de test
|
| 30 |
COPY faker_text.csv ./
|
| 31 |
COPY numeric_only.csv ./
|
| 32 |
|
| 33 |
# Port exposé par Streamlit
|
| 34 |
-
EXPOSE 8501
|
| 35 |
|
| 36 |
-
# Vérification de santé
|
| 37 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 38 |
|
| 39 |
# Point d'entrée pour démarrer l'application Streamlit
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Utilisation de la dernière image slim de Python 3.12
|
| 2 |
+
FROM python:3.12-slim
|
| 3 |
|
| 4 |
+
# Définition du répertoire de travail
|
| 5 |
+
WORKDIR /app
|
| 6 |
|
| 7 |
# Installation des dépendances système nécessaires
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
build-essential \
|
| 10 |
curl \
|
| 11 |
git \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# Copie du fichier des dépendances Python
|
| 15 |
+
COPY requirements.txt ./
|
| 16 |
|
| 17 |
# Installation des dépendances Python
|
| 18 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
+
# Copie de app.py et des fichiers CSV de test
|
| 21 |
+
COPY app.py ./
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
COPY faker_text.csv ./
|
| 23 |
COPY numeric_only.csv ./
|
| 24 |
|
| 25 |
# Port exposé par Streamlit
|
| 26 |
+
EXPOSE 8501
|
| 27 |
|
| 28 |
+
# Vérification de santé
|
| 29 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 30 |
|
| 31 |
# Point d'entrée pour démarrer l'application Streamlit
|
| 32 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|