https://www.cnblogs.com/wangtianning1223/p/16978609.html
sudo apt-get install libcudnn8=8.6.0.163-1+cuda11.8
sudo apt-get install libcudnn8-dev=8.6.0.163-1+cuda11.8
sudo apt-get install libcudnn8-samples=8.6.0.163-1+cuda11.8
Update:
新的安装方式:
ubuntu 20.04 安装 高版本cuda 11.7 和 cudnn最新版_ubuntu安装cuda11.7-优快云博客
sudo apt-get install libcudnn8=8.5.0.96-1+cuda11.7
sudo apt-get install libcudnn8-dev=8.5.0.96-1+cuda11.7
sudo apt-get install libcudnn8-samples=8.5.0.96-1+cuda11.7
torch 1.13:
最好是pip安装,我用conda命令结果装好都是cpu版本
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117