# 42 — host compute for node OCR

Use the stronger host/NVIDIA machine for OCR while the documents stay on a
weaker node such as Lenovo.

## Pattern

```text
Lenovo node          URI transfer             Host/NVIDIA compute
fs://file/blob  ->   bytes_b64 + sha256  ->   ocr://document/text
```

The node only needs sandboxed filesystem reads:

- `fs://host/dir/query/list`
- `fs://host/file/query/blob`

The host runs OCR:

- `ocr://host/document/query/text`
- `ocr://host/document/query/text_from_uri`

## Run

```bash
cd /home/tom/github/if-uri/examples/42-host-compute-node-ocr
./host_compute_ocr.py \
  --node-url http://192.168.188.201:8765 \
  --start-path . \
  --max-files 25 \
  --output-dir .state
```

Outputs:

- `.state/host_compute_ocr.csv`
- `.state/host_compute_ocr_raw.json`
- `.state/host_compute_ocr.md`

This example does not move, delete or rename files.

## Why this is useful

Lenovo does not need `tesseract`, `imgl`, `img2nl`, `wronai/ocr`, `ollama` or GPU
packages. It only exposes files through `fs://` under `IFURI_FS_ROOT`. The host
can then use its local OCR/LLM stack and write reports locally.
