rag-service/ocr-service
2026-09-14 22:35:11 +02:00
..
app feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00
tests feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00
Dockerfile feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00
Dockerfile.dockerignore feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00
README.md feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00
requirements.txt feat(ocr): add PaddleOCR rendering 2026-09-14 22:35:11 +02:00

OCR Service Development Environment

Unit 5 uses the repository-local virtual environment ocr-service/.venv. It is intentionally retained between runs and ignored by Git. Do not install these dependencies globally.

Install

From the repository root:

ocr-service/.venv/bin/python -m pip install -r ocr-service/requirements.txt

Activate it with source ocr-service/.venv/bin/activate.

Test

ocr-service/.venv/bin/python -m pytest ocr-service/tests

The container build downloads the pinned PaddleOCR models. Runtime startup loads those baked models before readiness can report healthy. Deploy one replica with a maximum of 3 CPU and 5 GiB RAM; Docker image labels document these platform-enforced limits.

Build from the repository root so the Dockerfile can use the service-scoped paths:

docker build -f ocr-service/Dockerfile -t rag-ocr-service .