Suya OCR API — vLLM-backed, OpenAI-compatible OCR service

FastAPI service wrapping the Surya-OCR-2 model (datalab-to) served through vLLM:
legacy /v1/api/ai/* endpoints, an OpenAI-compatible /v1/chat/completions endpoint,
a coalescing request batcher, a local OCR CLI, Docker packaging, multilingual
example outputs, and quantization/concurrency benchmarks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Fu Dai
2026-06-17 10:20:02 +04:00
co-authored by Claude Opus 4.8
commit 1a585693be
147 changed files with 13827 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
if ! command -v nvidia-ctk >/dev/null 2>&1; then
echo "nvidia-ctk is not installed. Install NVIDIA Container Toolkit first." >&2
exit 1
fi
sudo nvidia-ctk runtime configure --runtime=docker --config=/etc/docker/daemon.json
if command -v systemctl >/dev/null 2>&1; then
sudo systemctl restart docker
else
sudo service docker restart
fi
docker info --format '{{json .Runtimes}}'
docker run --rm --runtime nvidia --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi