feat(ocr): 新增本地 OCR sidecar
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# 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 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
|
||||
```
|
||||
Reference in New Issue
Block a user