FROM python:3.11-slim # Minimal system install for OCR speed RUN apt-get update && apt-get install -y --no-install-recommends \ tesseract-ocr \ libgl1-mesa-glx \ && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app # Standard Python setup COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Hugging Face mandatory port EXPOSE 7860 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]