ubuntu18.04安装cuda10 cudnn

一、卸载cuda8.0

使用cuda自带的卸载工具进行卸载。

 
  1. cd /usr/local/cuda/bin

  2. sudo ./uninstall_cuda_9.0.pl

安装指示卸载即可。

https://blog.csdn.net/yjt1325/article/details/84641062 安装.deb文件过程。

The base installer is available for download below.

 

 Base InstallerDownload (1.6 GB)  
Installation Instructions:
  1. `sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb`
  2. `sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub`
  3. `sudo apt-get update`
  4. `sudo apt-get install cuda`
Other installation options are available in the form of meta-packages. For example, to install all the library packages, replace "cuda" with the "cuda-libraries-10-0" meta package. For more information on all the available meta packages click here.

The CUDA Toolkit contains Open-Source Software. The source code can be found here.
The checksums for the installer and patches can be found in Installer Checksums
For further information, see the Installation Guide for Linux and the CUDA Quick Start Guide.

 

 

一 安装显卡驱动:

直接在系统软件更新中选择安装:

或者选择PPA源安装,参照:https://blog.csdn.net/new_delete_/article/details/81544438

输入命令测试是否安装成功:

nvidia-smi
 

二 安装CUDA10

CUDA官网选择适合自己系统的版本下载。

2、运行命令安装CUDA10

sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
 

3、添加环境变量:

打开 .bashrc

sudo gedit ~/.bashrc
在末尾添加:

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


保存退出

刷新环境变量:

source ~/.bashrc
测试CUDA是否安装成功:

nvcc -V
界面如下:

三 安装CUDNN

在官网下载安装包,需要注册登录才能下载,选择适合自己的版本(选择deb安装包,可直接安装完成,而不需要人为拷贝):

在这我选择:cuDNN Runtime Library for Ubuntu18.04 (Deb)

 

安装CUDNN:

sudo dpkg -i libcudnn7_7.4.1.5-1+cuda10.0_amd64.deb 
 

完成

 
--------------------- 
作者:yjt1325 
来源:CSDN 
原文:https://blog.csdn.net/yjt1325/article/details/84641062 
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值