Spaces:
Sleeping
Sleeping
| # syntax = docker/dockerfile:1.4 | |
| FROM python:3.12-slim | |
| # Installe les dépendances système nécessaires pour Pillow/Matplotlib + compilation si besoin | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| g++ \ | |
| libjpeg62-turbo-dev \ | |
| zlib1g-dev \ | |
| libpng-dev \ | |
| libfreetype6-dev \ | |
| libopenjp2-7-dev \ | |
| libtiff5-dev \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copie requirements en premier (meilleur cache) | |
| COPY requirements.txt . | |
| # Installe tout (sans cache pour réduire la taille finale) | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copie le code et les données | |
| COPY app.py . | |
| COPY faker_text.csv . | |
| COPY numeric_only.csv . | |
| # Port + commande obligatoire pour HF Spaces | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 | |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"] |