Eric2mangel commited on
Commit
8b46ceb
·
verified ·
1 Parent(s): bff6c7b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # 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
- # 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
- # Vérification de santé
30
- HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl -f http://localhost:8501/_stcore/health || curl -f http://localhost:8501/healthz || exit 1
 
31
 
32
- # Point d'entrée pour démarrer l'application Streamlit
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"]