FROM python:3.10-bookworm WORKDIR /app # Install system dependencies for OpenCV and PaddleOCR RUN apt-get update && apt-get install -y --no-install-recommends \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ libgl1 \ libgomp1 \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]