Skip to content

Commit d649b0d

Browse files
committed
feat: update pyproject.toml
1 parent 8c43dab commit d649b0d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

backend/pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ dependencies = [
5050
"dicttoxml>=1.7.16",
5151
"dmpython>=2.5.22; platform_system != 'Darwin'",
5252
]
53+
54+
[project.optional-dependencies]
55+
cpu = [
56+
"torch>=2.7.0",
57+
]
58+
cu128 = [
59+
"torch>=2.7.0",
60+
]
61+
62+
[[tool.uv.index]]
63+
name = "pytorch-cpu"
64+
url = "https://download.pytorch.org/whl/cpu"
65+
explicit = true
66+
67+
[[tool.uv.index]]
68+
name = "pytorch-cu128"
69+
url = "https://download.pytorch.org/whl/cu128"
70+
explicit = true
71+
5372
[[tool.uv.index]]
5473
name = "default"
5574
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
@@ -62,8 +81,18 @@ explicit = true
6281

6382
[tool.uv.sources]
6483
sqlbot-xpack = { index = "testpypi" }
84+
torch = [
85+
{ index = "pytorch-cpu", extra = "cpu" },
86+
{ index = "pytorch-cu128", extra = "cu128" },
87+
]
6588

6689
[tool.uv]
90+
conflicts = [
91+
[
92+
{ extra = "cpu" },
93+
{ extra = "cu128" },
94+
],
95+
]
6796
dev-dependencies = [
6897
"pytest<8.0.0,>=7.4.3",
6998
"mypy<2.0.0,>=1.8.0",

0 commit comments

Comments
 (0)