Ubuntu16.04安装CUDA8.0+cuDNN6.0
最近公司的环境反复安装,把步骤记录下来。
步骤
安装显卡
1.清除旧显卡
sudo apt-get
2.去官网下载适配的显卡

3.安装显卡
dpkg -i nvidia-diag-driver-local-repo-ubuntu1604-384.66_1.0-1_amd64.deb
apt-get update
apt-get install cuda-drivers
4.验证
nvidia-smi

安装CUDA8.0
1.去官网下载合适版本
2.安装
sh cuda_8.0.44_linux.run
注意:

因为已经安装过显卡,这里选择no.
3.修改配置
sudo vi /etc/profile
在文件最后添加
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
保存退出,然后
source /etc/profile
4.验证
nvcc -V

安装cuDNN6.0
1.去官网下载相应版本
2.安装
sudo dpkg -i libcudnn6_6.0.21-1+cuda8.0_amd64.deb