Pytorch-Nightly Install Issue

I am trying to install the latest nightly version using the command conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia. I have an RTX 3060 GPU on my device, but conda only installs the cpu version instead of the cuda version. If I try to install any other version, say nightly cuda=11.8 version, it install the correct cuda-compiled pytorch version. Any leads on this?

Thanks.

PS. I am using Ubuntu 23.04 and Python 3.9

Try installing via pip:

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118