2023.08.19 更新
如果是python中使用pytorch,不需要单独安装cuDNN,pytorch中已经集成了。
--------------------
WSL2 Ubuntu中安装cuDNN,还得注册
cuDNN是啥?
安装文档
https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-deb
Ubuntu算是debian系吧
下载
https://developer.nvidia.com/rdp/cudnn-download
网速不行,下载90%会话超时……
去球吧,不装了……
安装
Download the Debian local repository installation package. Before issuing the following commands, you must replace X.Y and 8.x.x.x with your specific CUDA and cuDNN versions.
- Navigate to your <cudnnpath> directory containing the cuDNN Debian local installer file.
- Enable the local repository.
sudo dpkg -i cudnn-local-repo-${OS}-8.x.x.x_1.0-1_amd64.deb
- or
sudo dpkg -i cudnn-local-repo-${OS}-8.x.x.x_1.0-1_arm64.deb
- Import the CUDA GPG key.
sudo cp /var/cudnn-local-repo-*/cudnn-local-*-keyring.gpg /usr/share/keyrings/
- Refresh the repository metadata.
sudo apt-get update
- Install the runtime library.
sudo apt-get install libcudnn8=8.x.x.x-1+cudaX.Y
- Install the developer library.
sudo apt-get install libcudnn8-dev=8.x.x.x-1+cudaX.Y
- Install the code samples.
sudo apt-get install libcudnn8-samples=8.x.x.x-1+cudaX.Y