Spaces:
Sleeping
Sleeping
File size: 669 Bytes
936ef75 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | FROM python:3.9-slim
# 1. Instalamos dependencias de sistema para audio e iconv
RUN apt-get update && apt-get install -y \
libc-bin \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 2. Copiamos e instalamos las librerías de Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 3. Copiamos todo el código del repositorio
COPY . .
# 4. Preparamos carpetas y permisos
RUN chmod +x ./ahotts/tts
RUN mkdir -p output
RUN mkdir -p /app/output && chmod 777 /app/output
EXPOSE 7860
# 5. Lanzamos el servidor
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
|