cat /usr/local/cuda/version.txt
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
cat /proc/driver/nvidia/version 或输入nvidia-smi
驱动安装完成后,下载cuda安装包(CUDA Toolkit Archive | NVIDIA Developer)
sudo ./cuda_8.0.61_375.26_linux.run
一直按ctrl+F,直到100%
其它的按部就班,但选择不安装驱动
出现***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work时,不用管它,此时只要安装的驱动版本更高比它更高即可
将cuda添加到环境变量,在~/.bashrc文件中末尾加上 export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
在NVIDIA_CUDA-8.0_Samples中编译相关samples,能编译通过则说明安装成功
sudo apt-get purge nvidia* sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-384 nvidia-settings reboot
注:如果要是不行,可能需要在bios里将显卡先设置成CPU集卡 验证 1.输入nvidia-smi查看 2.prime-select query查看当前选用的显卡
cd /usr/local/cuda/bin sudo ./uninstall_cuda_8.0.pl cd /usr/local sudo rm -rf cuda-8.0
参考:Installation Guide :: NVIDIA Deep Learning cuDNN Documentation
Installing from a Tar File
Navigate to your directory containing the cuDNN Tar file. Unzip the cuDNN package.
$ tar -xzvf cudnn-9.0-linux-x64-v7.tgz
Copy the following files into the CUDA Toolkit directory, and change the file permissions.
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include $ sudo cp cuda/lib64/libcudnn /usr/local/cuda/lib64* *$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn**
Installing from a Debian File
Navigate to your directory containing cuDNN Debian file. Install the runtime library, for example:
sudo dpkg -i libcudnn7_7.0.3.11-1+cuda9.0_amd64.deb
Install the developer library, for example:
sudo dpkg -i libcudnn7-devel_7.0.3.11-1+cuda9.0_amd64.deb
Install the code samples and the cuDNN Library User Guide, for example:
sudo dpkg -i libcudnn7-doc_7.0.3.11-1+cuda9.0_amd64.deb