Download Dockerfile from BOLLO-DIENG/Projet_Deep_Learning_BOLLO_DIENG: direct link, hf CLI and curl.
- Browser
- Download file 947 Bytes
-
https://huggingface.co/spaces/BOLLO-DIENG/Projet_Deep_Learning_BOLLO_DIENG/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BOLLO-DIENG/Projet_Deep_Learning_BOLLO_DIENG/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BOLLO-DIENG/Projet_Deep_Learning_BOLLO_DIENG/resolve/main/Dockerfile
947 Bytes
| FROM python:3.9-slim | |
| # Définir le dossier de travail | |
| WORKDIR /app | |
| # Rediriger le HOME de streamlit | |
| ENV HOME=/app | |
| ENV STREAMLIT_HOME=/app/.streamlit | |
| # Installer les dépendances système | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| software-properties-common \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Créer le dossier .streamlit avec les bonnes permissions | |
| RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit | |
| # Copier les fichiers du projet | |
| COPY requirements.txt . | |
| COPY src/ ./src/ | |
| COPY src/.streamlit/ /app/.streamlit/ | |
| # Installer les paquets Python | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Exposer le port Streamlit | |
| EXPOSE 8501 | |
| # Vérification de santé | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| # Lancer l’application Streamlit | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app1.py", "--server.port=8501", "--server.address=0.0.0.0"] | |