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 ...
随机推荐
- 用shell脚本执行php删除缓存文件
<?php #定义删除路径//服务器缓存目录的路径 $path = '/www/wwwroot/****/data/runtime'; #调用删除方法 deleteDir($path); fun ...
- 如何在CRichEditCtrl控件中直接读如RTF格式的文件(这个是通过流的方式来读取文件)
如何在CRichEditCtrl控件中直接读如RTF格式的文件 Inserting an RTF string using StreamIn ------------------------- ...
- 关于Async与Await的FAQ
=============C#.Net 篇目录============== 环境:VS2012(尽管System.Threading.Tasks在.net4.0就引入,在.net4.5中为其增加了更丰 ...
- mysql中geometry类型的简单使用
mysql中geometry类型的简单使用 编写本文的目的: 让和两天前的我一样的初学者,能够更快的使用geometry类型存储空间点数据 也是为了自己加深印象,更熟练的使用geometry类型 ...
- System.Math.cs
ylbtech-System.Math.cs 1. 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 ...
- day20_函数的闭包 与 装饰器
#!/usr/bin/env python # -*- coding:utf-8 -*- # # 一些文章 # https://www.cnblogs.com/Vae1242/p/6944338.ht ...
- day 66 Django基础二之URL路由系统
Django基础二之URL路由系统 本节目录 一 URL配置 二 正则表达式详解 三 分组命名匹配 四 命名URL(别名)和URL反向解析 五 命名空间模式 一 URL配置 Django 1.11 ...
- PAT甲级——A1137 Final Grading【25】
For a student taking the online course "Data Structures" on China University MOOC (http:// ...
- Spring Boot 实现定时任务的 4 种方式
作者:Wan QingHua wanqhblog.top/2018/02/01/SpringBootTaskSchedule/ 定时任务实现的几种方式: Timer:这是java自带的java.uti ...
- <Python基础>集合的基本操作
#小知识点:返回对象的内存地址 i,j = 1,2 print(id(i),id(j)) #集合的基本操作, #相当于没有键值对的字典,里面的元素是无序且不重复的 #一般写法 s = set({1,2 ...