FROM python:3.9 WORKDIR /code # Installation des dépendances système RUN apt-get update && apt-get install -y \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ && rm -rf /var/lib/apt/lists/* # Création du dossier cache avec les bonnes permissions RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache # Copie des requirements COPY requirements.txt . # Installation des dépendances Python RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copie de l'application COPY app.py . # Commande de démarrage OFFICIELLE pour Hugging Face CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]