| FROM python:3.10-slim | |
| WORKDIR /app | |
| # 1. Installation des outils système vitaux | |
| # espeak-ng est OBLIGATOIRE pour lire le français correctement | |
| RUN apt-get update && apt-get install -y \ | |
| espeak-ng \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Installation des librairies Python | |
| RUN pip install --no-cache-dir fastapi uvicorn soundfile kokoro | |
| # 3. Copie du fichier app.py que tu viens de créer | |
| COPY app.py . | |
| # 4. Configuration des ports pour Hugging Face | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 5. Démarrage du serveur | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |