Torch
https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix It is necessary that the required CUDA library is installed in the system, normally this is under ls -lad /usr/local/cuda*. …in a python project https://docs.astral.sh/uv/guides/integration/pytorch/ First create a new uv project: export UV_CACHE_DIR=/scratch/userdata/${USER}/CACHE export UV_NO_CACHE=1 cd /scratch/userdata/${USER} # uv will create a virtual env for each project uv init new-uv-project cd new-uv-project Customise the file pyproject.toml: [project] # the following supports CUDA 12.8 w/ CUDNN 9.10.2.21 requires-python = ">=3.10,<=3.15" dependencies = [ "torch>=2.9,<=2.10", "torchvision", "torchaudio", ] [tool.uv.sources] torch = { index = "pytorch" } [[tool.uv.index]] name = "pytorch" # experimental with 2.9 + 2.10 #url = "https://download.pytorch.org/whl/cu130" # stable support url = "https://download.pytorch.org/whl/cu128" explicit = true Now add packages defined in the pyproject.toml to the new project, the packages will be installed inside a virtual environment: ...
