tfg-api / Dockerfile
asierfg794's picture
EasyOCR + NLLB optimizado
affc051
raw
history blame contribute delete
725 Bytes
# ── Oinarri-irudia: Python 3.11 slim ──────────────────────────────────────
FROM python:3.11-slim
# Sistema-paketeak (Pillow-ek behar ditu)
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Lan-direktorioa
WORKDIR /app
# Dependentziak lehenengo kopiatu (Docker cache-a aprobetxatzeko)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Aplikazioaren kodea kopiatu
COPY app.py .
# Hugging Face Spaces-ek 7860 portua espero du
EXPOSE 7860
# Zerbitzaria abiarazi
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]