硬件与驱动环境:
官网下载cuda:
wget https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run
sudo sh cuda_11.7.1_515.65.01_linux.run
?
依次 abord,accept,取消cuda驱动安装?
修改环境变量:
(base) dell@dell-t640:~/下载$ vim ~/.bashrc
(base) dell@dell-t640:~/下载$ source ~/.bashrc
?
export PATH=/usr/local/cuda-11.7/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-11.7
安装cudnn?
sudo dpkg cudnn-local-repo-ubuntu2004-8.9.4.25_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2004-8.9.4.25/cudnn-local-0793C70B-keyring.gpg /usr/share/keyrings/
?
apt-cache policy libcudnn8
?
sudo apt-get install libcudnn8=8.9.4.25-1+cuda11.8
sudo apt-get install libcudnn8-dev=8.9.4.25-1+cuda11.8
sudo apt-get install libcudnn8-samples=8.9.4.25-1+cuda11.8
?
?
......
接下来是验证:
sudo apt-get install libfreeimage3 libfreeimage-dev
cp -r /usr/src/cudnn_samples_v8/ $HOME
cd $HOME/cudnn_samples_v8/mnistCUDNN
make clean && make
?
最后执行?
./mnistCUDNN
参考:Ubuntu22.04安装CUDA、cudnn详细步骤_ubuntu怎么启用 dnn 模块-CSDN博客?
Installation Guide - NVIDIA Docs?
Ubuntu18.04安装和CUDA安装_乌邦图系统18.04下载cuda8.2.2那个版本-CSDN博客?
基于ubuntu安装cuda,cuDNN_ubuntu安装cuda和cudnn-CSDN博客?