File size: 730 Bytes
2c4ca6c 1f2b7f0 2c4ca6c 1f2b7f0 2c4ca6c 1f2b7f0 2c4ca6c 1f2b7f0 2c4ca6c 1f2b7f0 2c4ca6c 1f2b7f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
FROM python:3.11-slim
# SO deps necesarias para audio/vídeo/OCR
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg libsndfile1 libsm6 libxext6 libgl1 tesseract-ocr build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Mejora estabilidad de instalación de wheels
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
# Instala deps primero (mejor cacheo)
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Copia el código
COPY . /app
# Puerto usado por HF Spaces
ENV PORT=7860
# Lanza FastAPI (ajusta si tu entrypoint NO es main_api.py)
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|