fix(ocr): pin transformers<5.0 and torch==2.7.1 in requirements.txt
Some checks failed
CI / Unit & Component Tests (push) Failing after 3s
CI / Backend Unit Tests (push) Failing after 1s
CI / Unit & Component Tests (pull_request) Failing after 1s
CI / Backend Unit Tests (pull_request) Failing after 1s

transformers 5.x breaks surya 0.17.1 — SuryaDecoderConfig is missing
pad_token_id. Pin to transformers>=4.56.1,<5.0.0.

Also add torch==2.7.1 to requirements.txt to prevent pip from upgrading
it past the CPU-only build installed in the Dockerfile layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-12 19:34:03 +02:00
parent 41f9262238
commit 6669fffead

View File

@@ -1,6 +1,8 @@
fastapi[standard]==0.115.6
surya-ocr==0.17.1
kraken==7.0
torch==2.7.1
transformers>=4.56.1,<5.0.0
pillow>=10.2.0,<11.0.0
pypdfium2==4.30.0
httpx==0.28.1