# Utiliser une image de base Python FROM python:3.10-slim-buster # Définir le répertoire de travail dans le conteneur WORKDIR /app # Set Streamlit's global data directory to a writable location ENV STREAMLIT_GLOBAL_DATA_DIR /tmp/.streamlit ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS false # Set the pgeocode cache directory ENV PGEOCODE_CACHE_DIR /tmp/pgeocode # Copier les fichiers de requirements COPY requirements.txt . # Installer les dépendances RUN pip install --no-cache-dir -r requirements.txt # Copier le code de l'application COPY . /app # Exposer le port sur lequel Streamlit s'exécute EXPOSE 7860 # Définir la commande à exécuter pour lancer l'application CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]