Installing torch using pixi with CUDA version specified

Hello, I am using the pixi package manager to install PyTorch but am not sure how to specify the correct CUDA version. The conda command generated from the PyTorch installer page is:

conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia

I can specify channels in pixi but am having trouble making sure the correct CUDA dependency is used. Has anyone successfully used pixi for this?

To follow up on this, in case anyone has a similar question: I found a solution by adding the following to my pixi.toml file:

[system-requirements]
cuda = "12.4"

Before running:

pixi add pytorch
pixi add torchvision

And now torch successfully finds the available GPUs.

1 Like