-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
62 lines (53 loc) · 1.79 KB
/
pyproject.toml
File metadata and controls
62 lines (53 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[project]
name = "uv-install-torch"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"matplotlib>=3.10.1",
"matplotlib-inline>=0.1.7",
"numpy>=2.2.4",
"opencv-python>=4.11.0.86",
"pandas>=2.2.3",
"pillow>=11.1.0",
"scikit-learn>=1.6.1",
"scipy>=1.15.2",
"seaborn>=0.13.2",
# "torch==2.4.1+cu124",
# "torchvision==0.19.1+cu124",
# "torchaudio==2.4.1+cu124",
"tqdm>=4.67.1",
]
# Specific versions of torch, torchvision, and torchaudio are installed based on the extra feature
[project.optional-dependencies]
cpu = ["torch==2.4.1", "torchvision==0.19.1", "torchaudio==2.4.1"]
cu124 = ["torch==2.4.1", "torchvision==0.19.1", "torchaudio==2.4.1"]
[tool.uv]
# The cpu and cu124 extras are mutually exclusive, you can't use both at the same time
conflicts = [[{ extra = "cpu" }, { extra = "cu124" }]]
# The package is only installed on Linux systems
# environments = ["sys_platform == 'linux' and os_name == 'posix'"]
[tool.uv.sources]
# The torch, torchvision, and torchaudio packages are installed from the pytorch-cpu and pytorch-cu124 indexes
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu124", extra = "cu124" },
]
torchvision = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu124", extra = "cu124" },
]
torchaudio = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu124", extra = "cu124" },
]
[[tool.uv.index]]
# The pytorch-cpu index is used to install the torch, torchvision, and torchaudio packages
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true