# ============================ # Dockerfile – Savant RRF Φ12.0 API # ============================ FROM python:3.11-slim ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 WORKDIR /app # Dependencias de sistema mínimas RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ && rm -rf /var/lib/apt/lists/* # Instalar dependencias Python COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt # Copiar el código de la API COPY main.py /app/main.py # Hugging Face token (en Spaces configúralo como secret HF_TOKEN) ENV HF_TOKEN="" # Puerto (HF Spaces suele usar 7860, pero respeta $PORT si está definido) ENV PORT=7860 EXPOSE 7860 # Lanzar FastAPI con uvicorn usando el puerto del entorno CMD ["bash", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"]