NVIDIA驱动安装、CUDA安装、cudnn安装
1、禁用 nouveau 驱动
sudo vim /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
或者
sudo vim /etc/modprobe.d/blacklist.conf
追加内容为:
# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
再执行:
sudo update-initramfs -u
sudo shutdown -r now
介绍一下 update-initramfs :
NAME
update-initramfs - generate an initramfs image SYNOPSIS
update-initramfs -c|-d|-u [-k version] [-t] [-v] [-b directory] [-h]
DESCRIPTION
The update-initramfs script manages your initramfs images on your local box. It keeps track of the existing initramfs archives in /boot. There are three modes of operation create, update or delete. You must at least specify one of those modes.
The initramfs is a gzipped cpio archive. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system. All finding of the root device happens in this early userspace. OPTIONS
-k version
Set the specific kernel version for whom the initramfs will be generated. For example the output of uname -r for your currently running kernel. This argument is optional for update. The default is the latest kernel version.
The use of "all" for the version string specifies update-initramfs to execute the chosen action for all kernel versions, that are already known to update-initramfs. -c
This mode creates a new initramfs.
-u
This mode updates an existing initramfs.
-d
This mode removes an existing initramfs.
-t
Allows one to take over an custom initramfs with a newer one.
-v
This option increases the amount of information you are given during the chosen action.
-b directory
Set an different bootdir for the image creation.
-h
Print a short help page describing the available options in update-initramfs.
2、关闭显示管理器
sudo /etc/init.d/lightdm stop
或者
sudo service lightdm stop
3、单独安装驱动
(1) 用cuda安装驱动
sudo <CudaInstaller>.run -silent -driver
(2) 下载驱动安装
下载路径:https://www.nvidia.com/Download/index.aspx?lang=cn
sudo ./NVIDIA-Linux-x86_64-430.40.run --no-opengl-files
- --no-opengl-files:表示只安装驱动文件,不安装OpenGL文件。这个参数不可省略,否则会导致登陆界面死循环,英语一般称为“login loop”或者“stuck in login”。
- 必选参数解释:因为NVIDIA的驱动默认会安装OpenGL,而Ubuntu的内核本身也有OpenGL、且与GUI显示息息相关,一旦NVIDIA的驱动覆写了OpenGL,在GUI需要动态链接OpenGL库的时候就引起问题。
- --no-x-check:表示安装驱动时不检查X服务,非必需,我们已经禁用图形界面。
- --no-nouveau-check:表示安装驱动时不检查nouveau,非必需,我们已经禁用驱动。
- -Z, --disable-nouveau:禁用nouveau。此参数非必需,因为之前已经手动禁用了nouveau。
- -A:查看更多高级选项。
4、安装cuda、cudnn
cuda下载路径:https://developer.nvidia.com/cuda-toolkit-archive
sudo <CudaInstaller>.run
NVIDIA官网cuda安装文档:https://docs.nvidia.com/cuda/index.html
cudnn下载路径(需要登录):https://developer.nvidia.com/rdp/cudnn-download
tar -zxvf cudnn-10.0-linux-x64-v7.3.1..tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda-10.0/include/
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.0/lib64/
sudo chmod a+r /usr/local/cuda-10.0/include/cudnn.h
sudo chmod a+r /usr/local/cuda-10.0/lib64/libcudnn*
sudo vim /etc/profile
追加内容为:
export PATH="/usr/local/cuda-10.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-10.0/lib64:/usr/local/cuda-10.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH"
NVIDIA驱动安装、CUDA安装、cudnn安装的更多相关文章
- AI模型运维——NVIDIA驱动、cuda、cudnn、nccl安装
目前大部分使用GPU的AI模型,都使用的英伟达这套. 需要注意的是,驱动.cuda.cudnn版本需要一一对应,高低版本互不兼容. 驱动和cuda对应关系:https://docs.nvidia.co ...
- PowerEdge T630服务器安装机器学习环境(Ubuntu18.04、Nvidia 1080Ti驱动、CUDA及CUDNN安装)
安装步骤 在开始安装之前,我要说明一下,这个Ubuntu18.04系统的安装,使用的连接线(就是服务器和电脑显示器的连接线)必须两头都是VGA连接线,不能使用VGA转HDMI连接线,也不能用DVI转D ...
- 安装Nvidia显卡驱动、CUDA和cuDNN的方法(jsxyhelu整编)
Nvidia显卡驱动.CUDA和cuDNN一般都是同时安装的,这里整理的是我成功运行的最简单的方法. 一.Nvidia显卡驱动 1.1 在可以进入图形界面的情况下 直接在"软件和更新&quo ...
- Ubuntu系统---安NVIDIA 驱动后 CUDA+cuDNN 安装
Ubuntu系统---安NVIDIA 驱动后 CUDA+cuDNN 安装 --------------------------------------------@20190726--------- ...
- 基于Ubuntu14.04系统的nvidia tesla K40驱动和cuda 7.5安装笔记
基于Ubuntu14.04系统的nvidia tesla K40驱动和cuda 7.5安装笔记 飞翔的蜘蛛人 注1:本人新手,文章中不准确的地方,欢迎批评指正 注2:知识储备应达到Linux入门级水平 ...
- Ubuntu16.04 Nvidia驱动、CUDA安装
安装Nvidia驱动和CUDA时往往很费力,经常有莫名奇妙的错误,这次安装十分顺畅,权当记录一下,以方便以后再次安装. 一.Nvidia显卡驱动安装 sudo add-apt-repository p ...
- ubuntu安装nvidia驱动以及cuda教程
最近尝试在ubuntu中安装nvidia的显卡驱动以及cuda.花了近三天时间,真的如网上所说错误百出,期间甚至重装了一次ubuntu系统,搞到怀疑人生,整个都是泪- -.最终经过百般“磨难”总算安装 ...
- 记录下自己安装cuda以及cudnn
之前已经装过一次了,不过没有做记录,现在又要翻一堆博客安装,长点记性,自己记录下. 环境 ubuntu16.04 python2.7 商家送过来时候已经装好了显卡驱动,所以省去了一大麻烦. 剩下的就是 ...
- win10 安装cuda和cudnn
首先通过nvidia-smi 查看自己的显卡驱动对应的cuda版本. 参考:https://blog.csdn.net/qq_40212975/article/details/89963016 再去官 ...
- Ubuntu安装CUDA、CUDNN比较有用的网址总结
Ubuntu安装CUDA.CUDNN比较有用的网址总结 1.tensorflow各个版本所对应的的系统要求和CUDA\CUDNN适配版本 https://tensorflow.google.cn/in ...
随机推荐
- web移动端rem的适配
** 需求: 随着移动端设备的变化,内容也跟着变化.**先来说说rem单位,以rem为单位,其大小是根据根元素(html标签)的字体大小来判断的, 如 html的font-size:100p ...
- 2816: [ZJOI2012]网络
传送们 把一个点拆成c个即可 浪费时间的水题... //Achen #include<algorithm> #include<iostream> #include<cst ...
- IDEA被删除的模块在编译时会再次出现
工程根目录下.idea文件->compiler.xml,删除多余的model,workspace.xml->删除带有无用的target标签
- mongodb操作指令(一):数据库,集合,文档
数据库 查看所有数据库 show dbs 查看当前数据库 db 创建使用数据库use runoob 删除数据库 db.dropDatabase() 集合 创建集合db.createCollection ...
- php算法题---连续子数组的最大和
php算法题---连续子数组的最大和 一.总结 一句话总结: 重要:一定要本机调试过了再提交代码,因为很容易出现考虑不周的情况,或者修改了之后没有考虑修改的这部分 利用空间来换时间,或者利用空间来换算 ...
- hive 总结四(优化)
本文参考:黑泽君相关博客 本文是我总结日常工作中遇到的坑,结合黑泽君相关博客,选取.补充了部分内容. 表的优化 小表join大表.大表join小表 将key相对分散,并且数据量小的表放在join的左边 ...
- <jquery>滚动例子
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- P1736 创意吃鱼法 /// DP
题目大意: https://www.luogu.org/problemnew/show/P1736 题解 dplr[][] 当前点左边(副对角线时为右边)有多少个连续的0 dpup[][] 当前点上边 ...
- 面试系列八 es写入数据的工作原理
(1)es写数据过程 1)客户端选择一个node发送请求过去,这个node就是coordinating node(协调节点) 2)coordinating node,对document进行路由,将请求 ...
- 转为win64后, MS的lib问题
> 正在创建库 C:\Users\Administrator\Desktop\branch-Unicode-156\\Temp\Link\PointCloudMeasure\x64 ...