ubuntu上CUDA9.0和CUDNN7.0安装

1、下载cuda,https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal。下载cuda9.0及其补丁的.run文件

2、下载cudnn,https://developer.nvidia.com/rdp/cudnn-archive

3、Ubuntu安装和卸载CUDA和CUDNN,参看:https://blog.csdn.net/qq_33200967/article/details/80689543

4、安装多个版本cuda并进行切换:https://blog.csdn.net/yinxingtianxia/article/details/80462892

5、在ubuntu18.04上安装cuda9.0:https://blog.csdn.net/u012428169/article/details/90942762

(ubuntu18.04与cuda9.0原本是不匹配的)

6、多账户使用不同cuda版本的情况:https://www.cnblogs.com/sddai/p/10278005.html

需要预先使用sudo权限安装各账户所需要的版本的cuda

export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

7、配置cuda版本,a)~/.bashrc  b)etc/profile  c)/etc/ld.so.conf.d/cuda.conf

export PATH=/usr/local/cuda-9.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/usr/local/cuda-9.0

8、cuda卸载:sudo perl /usr/local/bin/uninstall_cuda_drv.pl

9、cuda与ubuntu版本、显卡驱动、GCC版本间的关系:

https://blog.csdn.net/zl535320706/article/details/83474849

https://www.cnblogs.com/gaoyang666/p/10641770.html

 

查看版本

cuda:cat /usr/local/cuda/version.txt
cudnn:cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
opencv:pkg-config opencv --modversion

posted @ 2019-07-05 16:40  walker_bin  阅读(1579)  评论(0编辑  收藏  举报