Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -14
Dockerfile
CHANGED
|
@@ -1,33 +1,27 @@
|
|
| 1 |
-
# Utilisation de la dernière image slim de Python 3.12
|
| 2 |
FROM python:3.12-slim
|
| 3 |
|
| 4 |
-
|
|
|
|
| 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 |
-
# Copie de app.py et des fichiers CSV de test
|
| 18 |
COPY app.py ./
|
| 19 |
COPY faker_text.csv ./
|
| 20 |
COPY numeric_only.csv ./
|
| 21 |
-
COPY src/ ./src/
|
| 22 |
-
|
| 23 |
-
# Installation des dépendances Python
|
| 24 |
-
RUN pip3 install -r requirements.txt
|
| 25 |
|
| 26 |
-
# Port exposé par Streamlit
|
| 27 |
EXPOSE 8501
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
HEALTHCHECK --interval=30s --timeout=30s --start-period=
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
RUN pip install --upgrade pip
|
| 4 |
+
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
build-essential \
|
| 9 |
curl \
|
| 10 |
git \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
|
|
|
| 13 |
COPY requirements.txt ./
|
| 14 |
+
RUN pip3 install -r requirements.txt
|
| 15 |
|
|
|
|
| 16 |
COPY app.py ./
|
| 17 |
COPY faker_text.csv ./
|
| 18 |
COPY numeric_only.csv ./
|
| 19 |
+
# COPY src/ ./src/ # décommente si tu as vraiment ce dossier
|
|
|
|
|
|
|
|
|
|
| 20 |
|
|
|
|
| 21 |
EXPOSE 8501
|
| 22 |
|
| 23 |
+
# ←←← LIGNE À REMPLACER
|
| 24 |
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=5 \
|
| 25 |
+
CMD curl -f http://localhost:8501/_stcore/health || curl -f http://localhost:8501/healthz || exit 1
|
| 26 |
|
| 27 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true"]
|
|
|