# TurboOCR image version
# See https://github.com/aiptimizer/TurboOCR/releases for available tags
TURBOOCR_VERSION="v2.1.1"

# Language bundle (leave empty for latin / English-default)
# Supported: latin, chinese, greek, eslav, arabic, korean, thai
TURBOOCR_LANG=""

# When TURBOOCR_LANG=chinese, set to 1 to use the 84MB PP-OCRv5 server rec
# instead of the 16MB mobile rec (higher accuracy, more VRAM)
TURBOOCR_SERVER=""

# Concurrent GPU pipelines (~1.4 GB VRAM each); empty = auto-detect
TURBOOCR_PIPELINE_POOL_SIZE=""

# Disable PP-DocLayoutV3 layout detection model (1 = disable, saves ~300-500 MB VRAM)
TURBOOCR_DISABLE_LAYOUT=0

# Default PDF extraction mode
# ocr           - render + full OCR (safest, immune to text-layer attacks)
# geometric     - PDFium text layer only (~10x faster, but trusts PDF content)
# auto          - per-page text layer if available, else OCR
# auto_verified - OCR + cross-check against text layer
TURBOOCR_PDF_MODE="ocr"

# Skip angle classifier (1 = skip, ~0.4ms latency savings)
TURBOOCR_DISABLE_ANGLE_CLS=0

# Max detection input size in pixels
TURBOOCR_DET_MAX_SIDE=960

# PDF render parallelism
TURBOOCR_PDF_DAEMONS=16
TURBOOCR_PDF_WORKERS=4

# Maximum pages allowed per PDF request
TURBOOCR_MAX_PDF_PAGES=2000

# Log level: debug / info / warn / error
TURBOOCR_LOG_LEVEL="info"

# Log format: json (structured) / text (human-readable)
TURBOOCR_LOG_FORMAT="json"

# Host port mappings
TURBOOCR_HTTP_PORT_OVERRIDE=8000
TURBOOCR_GRPC_PORT_OVERRIDE=50051

# Resource limits
TURBOOCR_CPU_LIMIT=8.0
TURBOOCR_MEMORY_LIMIT=12G
TURBOOCR_CPU_RESERVATION=0.1
TURBOOCR_MEMORY_RESERVATION=4G

# Number of NVIDIA GPUs to reserve
TURBOOCR_GPU_COUNT=1

# Shared memory size for the container
TURBOOCR_SHM_SIZE=2g