FROM python:3.10-slim WORKDIR /app # Install Tesseract OS dependencies RUN apt-get update && apt-get install -y tesseract-ocr && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Run pytest during build RUN pytest test_main.py EXPOSE 8002 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8002"]