Files
catalogue_backend/requirements-ocr.txt
2026-09-19 15:39:53 +05:30

18 lines
901 B
Plaintext

# Server-side OCR engine for POST /api/search/identify (app/services/ocr_service.py).
#
# Installed SEPARATELY and WITHOUT its declared dependencies:
#
# pip install --no-deps -r requirements-ocr.txt
#
# because rapidocr's metadata demands opencv-python (the GUI build). A normal
# install would unpack it over the opencv-python-headless this project pins,
# and on the slim container image the GUI build fails to import (no libGL) -
# which would take the img_vector embedder down with it. Everything rapidocr
# actually needs (onnxruntime, Shapely, pyclipper, omegaconf, ...) is declared
# in requirements.txt and installed the normal way first.
#
# Pinned exactly: the PP-OCR models ship inside the wheel (~30MB, verified by
# checksum at construction, no download at runtime), so the version IS the
# model version. Bump deliberately, and re-run tests/test_ocr_engine_real.py.
rapidocr==3.9.2