Spaces:
Sleeping
Sleeping
| 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"] | |