Install Pytorch + Cuda using conda
You can install cuda in a conda enviroment using conda-forge and it just works :) No additional channels required.
this (snippet) of your pixi.toml should do the trick:
[dependencies]
cuda = "==12.6.3" # or any other exact version of cuda that is compatible with your pytorch version
pytorch-gpu = "==2.6.0" # this is the new package from conda-forgeThe pytorch conda channel is deprecated https://github.com/pytorch/pytorch/issues/138506, which means that the conda-forge version may be a bit out of date (like now the version 2.7 is not yet available), but you can still install pytorch from PyPi and cuda with conda and this works very well