镜像下载、域名解析、时间同步请点击
注意:
Ubuntu18.04默认GCC-7,由于CUDA 9.x不支持GCC-7(下载页面没有对ubuntu18的支持),所以需要安装低版本的5或者<= 6.3.0,并设置为默认版本。否则应安装10.0以上版本CUDA
# 法1
cat /usr/local/cuda/version.txt
# 法2
nvcc --version
nvidia-smi
如下图支持最高CUDA版本是11.4
若第1步提示Existing package manager installation of the driver found. It is strongly recommended that you remove this before continuing.,选择continue,在下一步中去除driver项,之后选择install:
安装完成后,显示如下:
export PATH=/usr/local/cuda-11.3/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
nvcc -V
1.Navigate to your <cudnnpath> directory containing the cuDNN tar file.
2.Unzip the cuDNN package.
$ tar -xvf cudnn-linux-x86_64-8.x.x.x_cudaX.Y-archive.tar.xz
3. Copy the following files into the CUDA toolkit directory.
$ sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include
$ sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
按照↑教程,可下载cuDNN Library for Linux (x86_64)用复制的方式安装,使用如下命令查看安装版本
cat /usr/local/cuda-11.3/include/cudnn.h | grep CUDNN_MAJOR -A 2
cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
本文转自:
https://blog.csdn.NET/CC977/article/details/122789394