# ---------------------------------------------------------------------------
# CoderAI — Surya OCR ISOLATED venv.
#
# Surya caps pillow<11, which conflicts with the main coderai venv (pillow>=12), so it
# CANNOT be installed alongside the rest of the stack. It runs in its own virtualenv +
# subprocess worker (same isolation pattern as the DINOv2-SALAD embedder). Create the
# venv separately, e.g.:
#
#     python3 -m venv ~/.coderai/surya_venv
#     ~/.coderai/surya_venv/bin/pip install -r requirements-surya.txt
#
# The coderai Surya backend shells out to this venv's python. GPL license (compatible
# with coderai's GPLv3); some releases add a revenue-capped commercial clause — check the
# version you install for commercial use.
# ---------------------------------------------------------------------------
# PIN to the NEWEST classic (pre-"Surya2") version. surya-ocr >=0.20 rearchitected to a
# VLM that needs an EXTERNAL backend — vLLM (defaults to a vllm-openai Docker image),
# llama-server (LLAMA_CPP_BINARY), or any OpenAI endpoint (openai_client). That is the
# right long-term path (serve Surya2 via coderai's planned vLLM/llama.cpp backend), but it
# does NOT run standalone in this isolated venv. 0.17.1 is the last version that runs
# det+recognition locally on torch (GPU), so it's the classic pin. See docs/ocr.md.
surya-ocr==0.17.1
pypdfium2>=4.20.0
