Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -20
Dockerfile
CHANGED
|
@@ -1,29 +1,12 @@
|
|
| 1 |
-
# Dockerfile
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 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 |
-
|
| 15 |
-
COPY requirements.txt ./
|
| 16 |
-
COPY . ./
|
| 17 |
|
| 18 |
-
# Installer les dépendances Python
|
| 19 |
-
RUN pip3 install -r requirements.txt
|
| 20 |
-
|
| 21 |
-
# Exposer le port utilisé par Streamlit
|
| 22 |
EXPOSE 8501
|
| 23 |
|
| 24 |
-
# Vérification de l'état de l'application
|
| 25 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 26 |
-
|
| 27 |
-
# Démarrer l'application Streamlit
|
| 28 |
-
# Assurez-vous que le nom du fichier est correct (app.py dans les exemples précédents)
|
| 29 |
-
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
COPY requirements.txt .
|
| 6 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
COPY app.py .
|
|
|
|
|
|
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
EXPOSE 8501
|
| 11 |
|
|
|
|
| 12 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
|
|
|
|
|
|
|
|
|
|
|