mg_tts_3 / Dockerfile
h-rand's picture
Update Dockerfile
3901e03 verified
raw
history blame contribute delete
813 Bytes
FROM python:3.10-slim
WORKDIR /app
# 1. Installation des libs système audio (CRUCIAL pour soundfile)
RUN apt-get update && apt-get install -y \
libsndfile1 \
build-essential \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# 2. Mise à jour pip
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
# 3. Installation Numpy (avant le reste pour éviter les problèmes de compilation)
RUN pip install --no-cache-dir "numpy<2.0.0"
# 4. Installation des requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. Copie de l'app
COPY app.py .
# 6. Dossier Cache (Pour télécharger le modèle Facebook)
ENV HF_HOME=/app/cache
RUN mkdir -p /app/cache && chmod 777 /app/cache
# 7. Lancement
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]