File size: 592 Bytes
ac50370 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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"] |