Skip to content

Commit e7755d5

Browse files
committed
RHAIENG-304: add uv pyproject.tomls for multiple notebooks and runtimes across Jupyter, RStudio, and VSCode (#2145)
1 parent a00d887 commit e7755d5

File tree

18 files changed

+1042
-0
lines changed

18 files changed

+1042
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[project]
2+
name = "notebooks"
3+
version = "0.1.0"
4+
requires-python = "==3.12.*"
5+
6+
dependencies = [
7+
# Base packages
8+
"wheel~=0.45.1",
9+
"setuptools~=78.1.1",
10+
11+
# Datascience packages
12+
"boto3~=1.37.8",
13+
"kafka-python-ng~=2.2.3",
14+
"matplotlib~=3.10.1",
15+
"numpy~=2.2.3",
16+
"pandas~=2.2.3",
17+
"plotly~=6.0.0",
18+
"scikit-learn~=1.6.1",
19+
"scipy~=1.15.2",
20+
"skl2onnx~=1.18.0",
21+
"ipykernel~=6.29.5",
22+
"kubeflow-training==1.9.2",
23+
24+
# Some extra useful packages
25+
"opencensus~=0.11.4",
26+
"smart-open~=7.0.1",
27+
"virtualenv~=20.29.3",
28+
"py-spy~=0.4.0",
29+
"prometheus-client~=0.21.1",
30+
]
31+
32+
[tool.uv]
33+
environments = [
34+
"sys_platform == 'linux' and implementation_name == 'cpython'",
35+
]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[project]
2+
name = "datascience-notebook"
3+
version = "0.1.0"
4+
requires-python = "==3.12.*"
5+
6+
dependencies = [
7+
# Datascience and useful extensions
8+
"boto3~=1.37.8",
9+
"kafka-python-ng~=2.2.3",
10+
"kfp~=2.12.1",
11+
"matplotlib~=3.10.1",
12+
"numpy~=2.2.3",
13+
"pandas~=2.2.3",
14+
"plotly~=6.0.0",
15+
"scikit-learn~=1.6.1",
16+
"scipy~=1.15.2",
17+
"skl2onnx~=1.18.0",
18+
"onnxconverter-common~=1.13.0", # Required for skl2onnx, as upgraded version is not compatible with protobuf
19+
"codeflare-sdk~=0.30.0",
20+
"kubeflow-training==1.9.3",
21+
22+
# DB connectors
23+
"pymongo~=4.11.2",
24+
"psycopg~=3.2.5",
25+
"pyodbc~=5.2.0",
26+
"mysql-connector-python~=9.3.0",
27+
28+
# JupyterLab packages
29+
"odh-elyra==4.2.3",
30+
31+
"jupyterlab==4.4.4",
32+
"jupyter-bokeh~=4.0.5",
33+
"jupyter-server~=2.16.0",
34+
"jupyter-server-proxy~=4.4.0",
35+
"jupyter-server-terminals~=0.5.3",
36+
"jupyterlab-git~=0.51.1",
37+
"jupyterlab-lsp~=5.1.1",
38+
"jupyterlab-widgets~=3.0.15",
39+
"jupyter-resource-usage~=1.1.1",
40+
"nbdime~=4.0.2",
41+
"nbgitpuller~=1.2.2",
42+
43+
# Base packages
44+
"wheel~=0.45.1",
45+
"setuptools~=78.1.1",
46+
]
47+
48+
[tool.uv]
49+
environments = [
50+
"sys_platform == 'linux' and implementation_name == 'cpython'",
51+
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[project]
2+
name = "minimal-notebook"
3+
version = "0.1.0"
4+
requires-python = "==3.12.*"
5+
6+
dependencies = [
7+
# JupyterLab packages
8+
"jupyterlab==4.4.4",
9+
"jupyter-server~=2.16.0",
10+
"jupyter-server-proxy~=4.4.0",
11+
"jupyter-server-terminals~=0.5.3",
12+
"jupyterlab-git~=0.51.1",
13+
"nbdime~=4.0.2",
14+
"nbgitpuller~=1.2.2",
15+
16+
# Base packages
17+
"wheel~=0.45.1",
18+
"setuptools~=78.1.1",
19+
]
20+
21+
[tool.uv]
22+
environments = [
23+
"sys_platform == 'linux' and implementation_name == 'cpython'",
24+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# https://docs.astral.sh/uv/concepts/projects/config/
2+
[project]
3+
name = "pytorch-llmcompressor-notebook"
4+
version = "0.1.0"
5+
requires-python = "==3.12.*"
6+
7+
# https://docs.astral.sh/uv/concepts/projects/workspaces/#when-not-to-use-workspaces
8+
dependencies = [
9+
"vllm~=0.8.5",
10+
11+
# PyTorch packages
12+
"tensorboard~=2.19.0",
13+
"torch==2.6.0",
14+
"torchvision==0.21.0",
15+
16+
# llmcompressor packages
17+
"llmcompressor~=0.6.0",
18+
"lm-eval~=0.4.8",
19+
"loguru",
20+
"pyyaml>=5.0.0",
21+
"requests>=2.0.0",
22+
"tqdm>=4.0.0",
23+
"transformers>4.0,<5.0",
24+
"datasets",
25+
"accelerate>=0.20.3,!=1.1.0",
26+
"pynvml",
27+
"pillow",
28+
"compressed-tensors",
29+
30+
# Datascience and useful extensions
31+
"boto3~=1.37.8",
32+
"kafka-python-ng~=2.2.3",
33+
"kfp~=2.12.1",
34+
"matplotlib~=3.10.1",
35+
"numpy<2.0.0",
36+
"pandas~=2.2.3",
37+
"plotly~=6.0.0",
38+
"scikit-learn~=1.6.1",
39+
"scipy~=1.15.2",
40+
"skl2onnx~=1.18.0",
41+
"onnxconverter-common~=1.13.0", # Required for skl2onnx, as upgraded version is not compatible with protobuf
42+
"kubeflow-training==1.9.0",
43+
44+
# DB connectors
45+
"pymongo~=4.11.2",
46+
"psycopg~=3.2.5",
47+
"pyodbc~=5.2.0",
48+
"mysql-connector-python~=9.3.0",
49+
50+
# JupyterLab packages
51+
"odh-elyra==4.2.3",
52+
"jupyterlab==4.4.4",
53+
"jupyter-bokeh~=4.0.5",
54+
"jupyter-server~=2.16.0",
55+
"jupyter-server-proxy~=4.4.0",
56+
"jupyter-server-terminals~=0.5.3",
57+
"jupyterlab-git~=0.51.1",
58+
"jupyterlab-lsp~=5.1.0",
59+
"jupyterlab-widgets~=3.0.13",
60+
"jupyter-resource-usage~=1.1.1",
61+
"nbdime~=4.0.2",
62+
"nbgitpuller~=1.2.2",
63+
64+
# Base packages
65+
"wheel~=0.45.1",
66+
"setuptools~=78.1.1",
67+
]
68+
69+
## https://docs.astral.sh/uv/concepts/resolution/#dependency-metadata
70+
#[[tool.uv.dependency-metadata]]
71+
## TODO(HACK): vllm is a requirement, however, as compressed-tensors is pinned, this can't be installed together
72+
#name = "vllm"
73+
#version = "0.8.5"
74+
#requires-dist = [
75+
# "compressed-tensors"
76+
#]
77+
78+
# https://docs.astral.sh/uv/concepts/projects/dependencies/#dependency-sources
79+
[tool.uv.sources]
80+
# https://docs.astral.sh/uv/guides/integration/pytorch/#using-uv-with-pytorch
81+
torch = { index = "pytorch" }
82+
torchvision = { index = "pytorch" }
83+
84+
# https://docs.astral.sh/uv/concepts/indexes/#package-indexes
85+
[[tool.uv.index]]
86+
name = "pytorch"
87+
url = "https://download.pytorch.org/whl/cu124"
88+
explicit = true
89+
90+
# https://docs.astral.sh/uv/concepts/resolution/#dependency-overrides
91+
# https://docs.astral.sh/uv/reference/settings/#override-dependencies
92+
[tool.uv]
93+
# https://github.com/astral-sh/uv/issues/2686
94+
# https://github.com/astral-sh/uv/issues/4422
95+
override-dependencies = [
96+
# vllm is a requirement, however, as compressed-tensors is pinned, this can't be installed together
97+
"compressed-tensors",
98+
]
99+
100+
environments = [
101+
"sys_platform == 'linux' and implementation_name == 'cpython'",
102+
]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[project]
2+
name = "pytorch-notebook"
3+
version = "0.1.0"
4+
requires-python = "==3.12.*"
5+
6+
dependencies = [
7+
# PyTorch packages
8+
"tensorboard~=2.19.0",
9+
"torch==2.6.0+cu126",
10+
"torchvision==0.21.0+cu126",
11+
12+
# Datascience and useful extensions
13+
"boto3~=1.37.8",
14+
"kafka-python-ng~=2.2.3",
15+
"kfp~=2.12.1",
16+
"matplotlib~=3.10.1",
17+
"numpy~=2.2.3",
18+
"pandas~=2.2.3",
19+
"plotly~=6.0.0",
20+
"scikit-learn~=1.6.1",
21+
"scipy~=1.15.2",
22+
"skl2onnx~=1.18.0",
23+
"onnxconverter-common~=1.13.0", # Required for skl2onnx, as upgraded version is not compatible with protobuf
24+
"codeflare-sdk~=0.30.0",
25+
"kubeflow-training==1.9.2",
26+
27+
# DB connectors
28+
"pymongo~=4.11.2",
29+
"psycopg~=3.2.5",
30+
"pyodbc~=5.2.0",
31+
"mysql-connector-python~=9.3.0",
32+
33+
# JupyterLab packages
34+
"odh-elyra==4.2.3",
35+
36+
"jupyterlab==4.4.4",
37+
"jupyter-bokeh~=4.0.5",
38+
"jupyter-server~=2.16.0",
39+
"jupyter-server-proxy~=4.4.0",
40+
"jupyter-server-terminals~=0.5.3",
41+
"jupyterlab-git~=0.51.1",
42+
"jupyterlab-lsp~=5.1.1",
43+
"jupyterlab-widgets~=3.0.15",
44+
"jupyter-resource-usage~=1.1.1",
45+
"nbdime~=4.0.2",
46+
"nbgitpuller~=1.2.2",
47+
48+
# Base packages
49+
"wheel~=0.45.1",
50+
"setuptools~=78.1.1",
51+
]
52+
53+
[tool.uv.sources]
54+
torch = {index = "pytorch-cuda"}
55+
torchvision = {index = "pytorch-cuda"}
56+
57+
# https://docs.astral.sh/uv/concepts/indexes/#package-indexes
58+
[[tool.uv.index]]
59+
name = "pytorch-cuda"
60+
url = "https://download.pytorch.org/whl/cu126"
61+
explicit = true
62+
63+
[tool.uv]
64+
environments = [
65+
"sys_platform == 'linux' and implementation_name == 'cpython'",
66+
]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[project]
2+
name = "rocm-pytorch-notebook"
3+
version = "0.1.0"
4+
requires-python = "==3.12.*"
5+
6+
dependencies = [
7+
# ROCm PyTorch packages
8+
"tensorboard~=2.18.0",
9+
"torch==2.6.0+rocm6.2.4",
10+
"torchvision==0.21.0+rocm6.2.4", # https://pytorch.org/get-started/previous-versions/#linux-and-windows-1
11+
"pytorch-triton-rocm~=3.2.0",
12+
13+
# Datascience and useful extensions
14+
"boto3~=1.37.8",
15+
"kafka-python-ng~=2.2.3",
16+
"kfp~=2.12.1",
17+
"matplotlib~=3.10.1",
18+
"numpy~=2.2.3",
19+
"pandas~=2.2.3",
20+
"plotly~=6.0.0",
21+
"scikit-learn~=1.6.1",
22+
"scipy~=1.15.2",
23+
"skl2onnx~=1.18.0",
24+
"onnxconverter-common~=1.13.0", # Required for skl2onnx, as upgraded version is not compatible with protobuf
25+
"codeflare-sdk~=0.30.0",
26+
"kubeflow-training==1.9.2",
27+
28+
# DB connectors
29+
"pymongo~=4.11.2",
30+
"psycopg~=3.2.5",
31+
"pyodbc~=5.2.0",
32+
"mysql-connector-python~=9.3.0",
33+
34+
# JupyterLab packages
35+
"odh-elyra==4.2.3",
36+
"jupyterlab==4.4.4",
37+
"jupyter-bokeh~=4.0.5",
38+
"jupyter-server~=2.16.0",
39+
"jupyter-server-proxy~=4.4.0",
40+
"jupyter-server-terminals~=0.5.3",
41+
"jupyterlab-git~=0.51.1",
42+
"jupyterlab-lsp~=5.1.1",
43+
"jupyterlab-widgets~=3.0.15",
44+
"jupyter-resource-usage~=1.1.1",
45+
"nbdime~=4.0.2",
46+
"nbgitpuller~=1.2.2",
47+
48+
# Base packages
49+
"wheel~=0.45.1",
50+
"setuptools~=78.1.1",
51+
]
52+
53+
[tool.uv.sources]
54+
torch = { index = "pytorch-rocm" }
55+
torchvision = { index = "pytorch-rocm" }
56+
pytorch-triton-rocm = { index = "pytorch-rocm" }
57+
58+
# Please keep in sync with rocm/ubi9-python-3.12/Dockerfile
59+
[[tool.uv.index]]
60+
name = "pytorch-rocm"
61+
url = "https://download.pytorch.org/whl/rocm6.2.4"
62+
explicit = true
63+
64+
[tool.uv]
65+
environments = [
66+
"sys_platform == 'linux' and implementation_name == 'cpython'",
67+
]

0 commit comments

Comments
 (0)