FROM python:3.11-slim WORKDIR /code # Installer les dépendances système nécessaires RUN apt-get update && apt-get install -y \ libgl1-mesa-glx \ libglib2.0-0 \ ffmpeg \ imagemagick \ && rm -rf /var/lib/apt/lists/* # Copier les fichiers de requirements COPY requirements.txt . # Installer les dépendances Python RUN pip install --no-cache-dir -r requirements.txt # Copier le code de l'application COPY . . # Exposer le port EXPOSE 7860 # Commande pour démarrer l'application CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]