# Surya in its own venv, baked at /opt/coderai/venvs/surya (the OCR engine finds
# it there — see codai/ocr/subprocess_engine._resolve_venv_dir).
#
# It CANNOT live in the main venv: surya-ocr caps pillow<11 and coderai needs
# pillow>=12. Installing it alongside either breaks image loading or silently
# downgrades pillow for everything else.
#
# This venv holds the surya CLIENT, which is also where it belongs in the split:
# with surya_serve="vllm" the heavy model runs in vLLM on the GPU pod and this
# side only renders, batches and post-processes. So the venv goes on the
# ORCHESTRATOR image, never on the rented card.
# CPU torch, explicitly. Measured in a resolved surya venv: nvidia wheels
# 3196 MB + triton 896 MB + torch 1175 MB = ~5.3 GB of CUDA stack, against
# ~250 MB for a CPU build. The `ocr` profile's own card runs docTR and (when
# baked) surya's local line detector; a CUDA resolve here is ~5 GB of image for
# a venv that, on a GPU-less orchestrator, can never execute any of it --
# `torch.cuda.is_available()` is False on a GPU-less orchestrator while its
# surya venv carries a cu130 build -- measured, and not a hypothetical.
#
# Set an explicit CUDA pin here if you WANT surya's line detection on the card.
--extra-index-url https://download.pytorch.org/whl/cpu
torch==2.14.1+cpu
surya-ocr==0.22.1
pillow<11
