Spaces:
Running
Running
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Instalar dependencias del sistema necesarias para llama-cpp-python | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copiar requirements primero (para mejor cache de Docker) | |
| COPY requirements.txt . | |
| # Copiar modelos | |
| COPY engines.json /app/engines.json | |
| # Instalar dependencias de Python | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copiar aplicación | |
| COPY app.py . | |
| # Exponer puerto | |
| EXPOSE 7860 | |
| # Comando de inicio | |
| CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120", "app:app"] |