| # Usar Python 3.12 | |
| FROM python:3.12-slim | |
| # Instalar dependencias del sistema si las necesitas (ffmpeg, etc.) | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libgl1 \ | |
| linux-libc-dev \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Crear directorio de trabajo | |
| WORKDIR /app | |
| # Copiar e instalar requirements | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copiar el resto del código | |
| COPY . /app | |
| # Hugging Face marca el puerto en la env PORT | |
| ENV PORT=7860 | |
| # Comando de arranque: tu app de Gradio | |
| CMD ["python", "app.py"] | |