FROM python:3.10-slim # Instalar dependencias del sistema RUN apt-get update && apt-get install -y \ ffmpeg \ libsndfile1 \ libsndfile1-dev \ git \ build-essential \ espeak-ng \ wget \ curl \ && rm -rf /var/lib/apt/lists/* # Crear directorio de trabajo WORKDIR /app # Copiar archivos de requisitos primero (mejor cache) COPY requirements.txt . COPY packages.txt . # Actualizar pip y instalar dependencias RUN pip install --no-cache-dir --upgrade pip setuptools wheel RUN pip install --no-cache-dir -r requirements.txt # Copiar el resto de la aplicación COPY app.py . COPY README.md . # Exponer puerto de Gradio EXPOSE 7860 # Variables de entorno ENV GRADIO_SERVER_NAME="0.0.0.0" ENV GRADIO_SERVER_PORT=7860 ENV PYTHONUNBUFFERED=1 # Comando de inicio CMD ["python", "-u", "app.py"]