Skip to content

Commit 67c74b6

Browse files
committed
Pin exactly torch 2.9.1 for nemotron-ocr extra
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
1 parent 664bd7d commit 67c74b6

File tree

2 files changed

+644
-553
lines changed

2 files changed

+644
-553
lines changed

pyproject.toml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ docling-tools = "docling.cli.tools:app"
9191

9292
[project.optional-dependencies]
9393
easyocr = ['easyocr (>=1.7,<2.0)']
94-
nemotron-ocr = ['nemotron-ocr (>=1.0.1,<2.0.0) ; python_version == "3.12" and sys_platform == "linux" and platform_machine == "x86_64"']
94+
nemotron-ocr = [
95+
'nemotron-ocr (>=1.0.1,<2.0.0) ; python_version == "3.12" and sys_platform == "linux" and platform_machine == "x86_64"',
96+
'torch (==2.9.1+cu130) ; python_version == "3.12" and sys_platform == "linux" and platform_machine == "x86_64"',
97+
'torchvision (==0.24.1+cu130) ; python_version == "3.12" and sys_platform == "linux" and platform_machine == "x86_64"',
98+
]
9599
tesserocr = ['tesserocr (>=2.7.1,<3.0.0)']
96100
ocrmac = ['ocrmac (>=1.0.0,<2.0.0) ; sys_platform == "darwin"']
97101
vlm = [
@@ -173,6 +177,19 @@ constraints = [
173177
package = true
174178
default-groups = "all"
175179

180+
[tool.uv.sources]
181+
torch = [
182+
{ index = "pytorch-cu130", extra = "nemotron-ocr" },
183+
]
184+
torchvision = [
185+
{ index = "pytorch-cu130", extra = "nemotron-ocr" },
186+
]
187+
188+
[[tool.uv.index]]
189+
name = "pytorch-cu130"
190+
url = "https://download.pytorch.org/whl/cu130"
191+
explicit = true
192+
176193
[tool.setuptools.packages.find]
177194
include = ["docling*"]
178195

0 commit comments

Comments
 (0)