Install Cuda CuDNN pytorch in conda environment


Install Conda

conda create –name <environment_name> python=3.8

Install CUDA

#conda install cuda -c nvidia/label/cuda-11.8.0
conda install cuda -c nvidia/label/cuda-11.7.1

Install CuDNN

#usually already installed

python3 -m pip install nvidia-cudnn-cu11

Install

#conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

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

Test Cuda Installation

python -c “import torch; print(torch.cuda.is_available())”;


Leave a Reply

Your email address will not be published. Required fields are marked *