Bartolomé Ortiz
fix Dockerfile name for HF
221f89d
raw
history blame contribute delete
627 Bytes
FROM python:3.11-slim
# Variables de entorno para evitar caché y mejorar logging
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Directorio de trabajo
WORKDIR /app
# Instala dependencias
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn
# Copia el resto de archivos de la app
COPY . .
# Hugging Face Spaces expone PORT=7860 (o el que defina el entorno)
ENV PORT=7860
EXPOSE 7860
# Lanza la app con Gunicorn
# Nota: cambia "2APP" si el archivo se llama distinto (sin .py)
CMD gunicorn app:server -b 0.0.0.0:${PORT} --workers 2 --threads 4 --timeout 120