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安装的更多相关文章

  1. AI模型运维——NVIDIA驱动、cuda、cudnn、nccl安装

    目前大部分使用GPU的AI模型,都使用的英伟达这套. 需要注意的是,驱动.cuda.cudnn版本需要一一对应,高低版本互不兼容. 驱动和cuda对应关系:https://docs.nvidia.co ...

  2. PowerEdge T630服务器安装机器学习环境(Ubuntu18.04、Nvidia 1080Ti驱动、CUDA及CUDNN安装)

    安装步骤 在开始安装之前,我要说明一下,这个Ubuntu18.04系统的安装,使用的连接线(就是服务器和电脑显示器的连接线)必须两头都是VGA连接线,不能使用VGA转HDMI连接线,也不能用DVI转D ...

  3. 安装Nvidia显卡驱动、CUDA和cuDNN的方法(jsxyhelu整编)

    Nvidia显卡驱动.CUDA和cuDNN一般都是同时安装的,这里整理的是我成功运行的最简单的方法. 一.Nvidia显卡驱动 1.1 在可以进入图形界面的情况下 直接在"软件和更新&quo ...

  4. Ubuntu系统---安NVIDIA 驱动后 CUDA+cuDNN 安装

    Ubuntu系统---安NVIDIA 驱动后  CUDA+cuDNN 安装 --------------------------------------------@20190726--------- ...

  5. 基于Ubuntu14.04系统的nvidia tesla K40驱动和cuda 7.5安装笔记

    基于Ubuntu14.04系统的nvidia tesla K40驱动和cuda 7.5安装笔记 飞翔的蜘蛛人 注1:本人新手,文章中不准确的地方,欢迎批评指正 注2:知识储备应达到Linux入门级水平 ...

  6. Ubuntu16.04 Nvidia驱动、CUDA安装

    安装Nvidia驱动和CUDA时往往很费力,经常有莫名奇妙的错误,这次安装十分顺畅,权当记录一下,以方便以后再次安装. 一.Nvidia显卡驱动安装 sudo add-apt-repository p ...

  7. ubuntu安装nvidia驱动以及cuda教程

    最近尝试在ubuntu中安装nvidia的显卡驱动以及cuda.花了近三天时间,真的如网上所说错误百出,期间甚至重装了一次ubuntu系统,搞到怀疑人生,整个都是泪- -.最终经过百般“磨难”总算安装 ...

  8. 记录下自己安装cuda以及cudnn

    之前已经装过一次了,不过没有做记录,现在又要翻一堆博客安装,长点记性,自己记录下. 环境 ubuntu16.04 python2.7 商家送过来时候已经装好了显卡驱动,所以省去了一大麻烦. 剩下的就是 ...

  9. win10 安装cuda和cudnn

    首先通过nvidia-smi 查看自己的显卡驱动对应的cuda版本. 参考:https://blog.csdn.net/qq_40212975/article/details/89963016 再去官 ...

  10. Ubuntu安装CUDA、CUDNN比较有用的网址总结

    Ubuntu安装CUDA.CUDNN比较有用的网址总结 1.tensorflow各个版本所对应的的系统要求和CUDA\CUDNN适配版本 https://tensorflow.google.cn/in ...

随机推荐

  1. Python 学习杂项

    #print("Hello World!") #name = "nihfjkds" age = 454 num1 = 1 num2 = 2 #print(nam ...

  2. day15 python-03 列表,元组,字典

    Python之路,Day3 = Python基础3 注: extend: 拼接 enumerate:打印序号,返回两个值 模块的简单使用 sys模块 #!/usr/bin/env python #这句 ...

  3. thinkphp for标签

    用法: 大理石平台厂家 <for start="开始值" end="结束值" comparison="" step="步进值 ...

  4. docker中国区镜像加速

    [root@syzyy ~]# vim /etc/docker/daemon.json { "registry-mirros":[ "https://registry.d ...

  5. 尚学python课程---14、python中级语法

    尚学python课程---14.python中级语法 一.总结 一句话总结: var[1:5] 访问模式:比如字符串,比如列表元祖,字典等 del 删除模式:比如列表.元祖.字典 1.Python的N ...

  6. SQLServer 中存储过程

    SQLServer 中存储过程返回的三种方式( 包括存储过程的创建, 在存储过程中调用, 在VS中调用的方法)存储过程有三种返回:   1.   用return返回数字型数据   2.   用返回参数 ...

  7. Hadoop 平台搭建

    一.在Linux中安装JDK并配置环境变量 输入javac 查看是否已安装java环境如果没有安装 sudo apt-get install openjdk-7-jdk再次检测 javac修改配置参数 ...

  8. (3)mysql表和字段的操作

    创建表 create table name( id int, student ) ); 查看表结构 ****常用**** describe 表名; 修改表名 老表 rename 新表 ALTER TA ...

  9. HDU-2095-find your present (2)-位或/STL(set)

    In the new year party, everybody will get a "special present".Now it's your turn to get yo ...

  10. “fixed+relative≈≈absolute”——对BFC的再次思考

    好久没写博客了,刚好今天跨年夜没约到什么妹子,在家宅着不如写点东西好了. 需求 昨天晚上,给公司年会做一个移动端的投票页面,遇到一个UI优化的问题: · 正文内容少于一屏时,投票提交按钮固定显示在页面 ...