| # syntax=docker/dockerfile:1 | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* | |
| # Descarga de PyTorch (Lo que lo hace pesado) | |
| RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu | |
| # Librerías completas de IA y Web | |
| RUN pip install --no-cache-dir \ | |
| flask==2.3.3 \ | |
| flask-cors==4.0.0 \ | |
| werkzeug==2.3.7 \ | |
| transformers \ | |
| accelerate \ | |
| huggingface_hub \ | |
| duckduckgo-search==5.3.0 \ | |
| gunicorn | |
| COPY server.py . | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "-w", "1", "--threads", "2", "-b", "0.0.0.0:7860", "--timeout", "120", "server:app"] |