Files
hfb_sys/deploy/ocr/README.md
T

27 lines
947 B
Markdown

# Local OCR sidecar
This service wraps the vendored `lxw112190/lw.PPOCR.C` runtime and the
PP-OCRv6 Tiny models behind the project's HTTP OCR API.
It is a self-contained Debian slim Docker image. The production host does not
need Ubuntu packages, a compiler, Python, PaddleOCR, or the OCR models installed.
It is intentionally private:
- no host port is published in production;
- only the backend joins the Docker network path to `http://ocr:8787`;
- requests are P6 PPM images;
- the process runs as UID/GID `10001`.
The Go backend keeps its existing asynchronous OCR job contract and calls this
service only when `OCR_SERVICE_URL` is set. If the service is unavailable, the
admin upload flow still allows manually entering the group name.
Local verification:
```bash
docker compose -f deploy/docker-compose.dev.yml up -d --build ocr
curl -fsS http://127.0.0.1:18787/health
docker compose -f deploy/docker-compose.dev.yml logs -f ocr
```