@@ -47,8 +47,8 @@ dependencies = [
4747 ' docling-core[chunking] (>=2.66.0,<3.0.0)' ,
4848 ' docling-parse (>=5.3.2,<6.0.0)' ,
4949 " docling-ibm-models>=3.12.0,<4" ,
50- ' torch (>=2.2.2,<3.0.0)' ,
51- ' torchvision (>=0,<1)' ,
50+ ' torch (>=2.2.2,<3.0.0) ; extra != "nemotron-ocr" ' ,
51+ ' torchvision (>=0,<1) ; extra != "nemotron-ocr" ' ,
5252 ' filetype (>=1.2.0,<2.0.0)' ,
5353 ' pypdfium2 (>=4.30.0,!=4.30.1,<6.0.0)' ,
5454 ' pydantic-settings (>=2.3.0,<3.0.0)' ,
@@ -91,7 +91,11 @@ docling-tools = "docling.cli.tools:app"
9191
9292[project .optional-dependencies ]
9393easyocr = [' 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+ ]
9599tesserocr = [' tesserocr (>=2.7.1,<3.0.0)' ]
96100ocrmac = [' ocrmac (>=1.0.0,<2.0.0) ; sys_platform == "darwin"' ]
97101vlm = [
@@ -173,6 +177,19 @@ constraints = [
173177package = true
174178default-groups = " all"
175179
180+ [tool .uv .sources ]
181+ torch = [
182+ { index = " pytorch-cu130" , extra = " nemotron-ocr" , marker = " python_version == '3.12' and sys_platform == 'linux' and platform_machine == 'x86_64'" },
183+ ]
184+ torchvision = [
185+ { index = " pytorch-cu130" , extra = " nemotron-ocr" , marker = " python_version == '3.12' and sys_platform == 'linux' and platform_machine == 'x86_64'" },
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 ]
177194include = [" docling*" ]
178195
0 commit comments