安装NVIDIA显卡驱动、CUDA、磁盘分区

安装NVIDIA显卡驱动和CUDA-8.0运算平台

  • 准备工作:下载安装包

    1. 查看显卡信息lspci | grep -i vga lspci -v -s 00:02.0
    2. 查看几张GPU卡 lspci | grep NVIDIA
    3. cuda_8.0.61_375.26_linux.run
    4. NVIDIA-Linux-x86_64-384.66.run
    5. 依赖kernels-3.10.0-514.21.2.el7.x86_64内核源码
      编译环境需要安装gcc

内核版本

内核下载地址 https://opsx.alibaba.com/ https://www.kernel.org/

查看内核版本 uname -r ls /boot | grep vmlinuz

查看已安装的内核包 rpm -aq | grep -i kernel

内核源码存放位置 ll /usr/src/kernels/

步骤

  1. 卸载 cuda

    sudo sh /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl

  2. 然后卸载驱动

    nvidia-installer --uninstall

    • 命令路径 /usr/bin/nvidia-installer
    • 注意:正常卸载后,nvidia-smi 命令就没了
  3. 安装内核

    解压 kernels-3.10.0-514.21.2.el7.x86_64.tar.gz 到 /usr/src/kernels/

  4. 安装英伟达显卡驱动

    sudo sh NVIDIA-Linux-x86_64-384.66.run

    • 安装后可测试nvidia-smi命令
  5. 安装cuda-8.0

    sudo sh cuda_8.0.61_375.26_linux.run

卸载NVIDIA-Linux-x86_64-384.66.run详细步骤

1. TODO这步不是很明白什么意思?

If you plan to no longer use the NVIDIA driver, you should make sure that no X screens are configured to use the NVIDIA X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have created a backup of your original configuration. Would you like to run nvidia-xconfig --restore-original-backup to attempt restoration of the original X configuration file?

            [Yes]选中yes回车                              No

安装 NVIDIA-Linux-x86_64-384.66.run详细步骤

1. 进入安装包目录执行 sudo sh NVIDIA-Linux-x86_64-384.66.run
2. Accept 接受许可证并继续安装

Please read the following LICENSE and then select either "Accept" to accept the license and continue with the installation, or select "Do Not Accept" to abort the installation.

            [Accept]选中Accept回车      Do Not Accept   
3. 安装Nvidia的32位兼容库?

Install NVIDIA‘s 32-bit compatibility libraries?

            Yes                           [No]选中NO回车     
4.测试命令 nvidia-smi

安装 cuda_8.0.61_375.26_linux.run详细步骤

1. 进入安装包目录执行 sudo sh cuda_8.0.61_375.26_linux.run
2. 阅读协议,按s下一页,直到100%阅读完毕
3. 按照一下步骤执行

Do you accept the previously read EULA? 
accept/decline/quit: accept

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26? 
(y)es/(n)o/(q)uit: y(若已安装其它版本选择no)

Install the CUDA 8.0 Toolkit? 
(y)es/(n)o/(q)uit: y

Enter Toolkit Location 
[ default is /usr/local/cuda-8.0 ]:

Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: n

Install the CUDA 8.0 Samples?
(y)es/(n)o/(q)uit: n

4. 耐心等待,显示如下信息安装成功

Installing the CUDA Toolkit in /usr/local/cuda-8.0 ...

= Summary =

Driver: Not Selected Toolkit: Installed in /usr/local/cuda-8.0 Samples: Not Selected

Please make sure that - PATH includes /usr/local/cuda-8.0/bin - LDLIBRARYPATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/>cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin

Please see CUDAInstallationGuide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.

***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work. To install the driver using this installer, run the following command, replacing with the name of this run file: sudo .run -silent -driver

Logfile is /tmp/cudainstall8566.log


5. 添加环境变量,在管理员用户根目录下,找到.bashrc文件并打开,在最后添加下面三行文本,保存退出即可

vim ~/.bashrc

# added by cuda_8.0 installer
export PATH="/usr/local/cuda-8.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH"

source ~/.bashrc

6. 检测cuda是否安装成功
    • 方案一
      执行nvcc -V,若显示以下信息,则安装cuda成功

      nvcc: NVIDIA (R) Cuda compiler driver
      Copyright (c) 2005-2016 NVIDIA Corporation
      Built on TueJan1013:22:03CST_2017
      Cuda compilation tools, release 8.0, V8.0.61

    • 方案二
      依次输入以下命令,测试cuda的执行结果

      cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery
      sudo make
      ./deviceQuery

    • 若最后显示Result = PASS,表明cuda查询显卡信息成功
    • 最后执行sudo make clean清除垃圾文件,并重启终端

      CUDA Device Query (Runtime API) version (CUDART static linking) Detected 1 CUDA Capable device(s) Device 0: "GeForce GTX 1080" CUDA Driver Version / Runtime Version 9.1 / 8.0 CUDA Capability Major/Minor version number: 6.1 Total amount of global memory: 8118 MBytes (8511881216 bytes) (20) Multiprocessors, (128) CUDA Cores/MP: 2560 CUDA Cores GPU Max Clock rate: 1734 MHz (1.73 GHz) Memory Clock rate: 5005 Mhz Memory Bus Width: 256-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384) Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 2 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

      deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 1080
      Result = PASS

    • 安装NVIDIA-Linux-x86_64-384.66.run提示先安装kernle-source或kernle-devel解决方案

      下载kernle-source源码包并解压到/usr/src/kernles/目录下

Linux下磁盘分区,格式化以及挂载

原文地址:https://www.cnblogs.com/pidgey/p/12394899.html

时间: 2024-10-14 20:17:02

安装NVIDIA显卡驱动、CUDA、磁盘分区的相关文章

ubuntu 14.04 如何安装nvidia显卡驱动 [转载]

我的机子装的是64位ubuntu 14.04 LTS系统,显卡是GeForce 405 ,想使用cuda所以需要装NVidia官方驱动,但是总是碰到 nouveau 驱动正在使用的问题.找了好久,网上各种将nouveau加入blacklist的文章都不能用,最终找到这篇文章,成功解决问题 转载[Ubuntu安装NVIDIA官方驱动] 由于NVIDIA显卡的开源驱动在性能和效果上比官方的驱动差之太远,无奈只能自己动手安装官方的驱动.安装NVIDIA驱动的具体流程如下:其实NVIDIA的官网的REA

dell optiplex ubuntu 14.04 安装 NVIDIA 显卡驱动

公司配置的 dell optiplex使用核显带起双屏幕,玩dota2无法特效全开.so,在京东上买了一块750Ti.安装驱动的时候需要切换到ubuntu的全命令行模式,关掉桌面系统才能安装.这时候这个坑出现了,要想安装驱动,就必须进入全命令行模式,要想进入命令行模式必须有驱动.反复尝试后,发现只能用DP口带单屏幕才能成功.在这里特别记录下.嘎嘎dell optiplex ubuntu 14.04 安装 NVIDIA 显卡驱动,布布扣,bubuko.com

Centos7安装nvidia显卡驱动

Centos 7安装Nvidia显卡驱动没有Fedora这种偏图形界面使用的Linux发行版容易.而且在网上搜到的方法都比较复杂,需要进行一定的修改设置.这里提供一种比较简单的方法,适合一些小白或者不想太折腾的使用者. 首先需要添加一个第三方的源ELRepo.这个源支持RED HAT系的Linux系统,主要是提供一些硬件的驱动程序.这个源的主页如下: http://elrepo.org/tiki/tiki-index.php 添加源分两步: 1.导入公共密钥 rpm --import https

Ubuntu下手动安装Nvidia显卡驱动

1. 下载最新版的nVidia驱动. http://www.nvidia.com/page/drivers.html 2.编辑blacklist.conf. sudo gedit /etc/modprobe.d/blacklist.conf 添加以下部分并保存: blacklist vga16fb blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv (这里有一行空格) 3. 删除之前所安装的nVidia驱动

在LinuxMint 17 MATE中安装NVIDIA显卡驱动

第一步:在Linux系统中安装Nvidia显卡驱动需要关闭X Server. 打开终端,进入ROOT权限,执行以下命令 $ sudo service mdm stop 此时将会把X Server关闭,并且进入命令行. 第二步:安装显卡驱动 $ cd /驱动所在目录 $ sh ./NVIDIA-Linux-x86-340.65.run 第三步:重新启动或重新开启X Server 重新开启X Server $ sudo service mdm start

kali无法安装nvidia显卡驱动

按照各位大神的博客安装nvidia显卡驱动一直失败,重启之后无法正常进入系统,恢复模式可以进入,一直以为自己是不是哪里步骤不对,后面来回重装了几次系统. 最后意识到虚拟机里用的是虚拟网卡,并非宿主机的真实网卡,所以是无法安装该显卡驱动的,安装之后重启当然无法正常进入系统.希望各位小伙伴看到之后能早点跳过这个坑. 以下是我重启过程中出现的错误提示: Failed to start Self Monitoring Analysis and Reporting Technology. 重启之后一直卡在

Ubuntu 14.04 LTS 安装 NVIDIA 显卡驱动后的屏幕亮度调节问题

安装 Ubuntu,对于 NVIDIA 显卡,默认情况下会使用第三方开源驱动,并且一般情况下,第三方开源驱动和系统兼容性更好.由于 NVIDIA 显卡驱动不是开放的,所以对 Linux 系统的原生支持要差一点,会引入一些小问题.所以,一般情况下,如果不是特别必要,使用第三方开源驱动是个好选择. 但如果要做 CUDA 相关开发,就必须使用 NVIDIA 官方驱动. 1. 安装. 不要手动安装.应该在 Software & Updates 的 Additional Drivers 下找到可用的显卡驱

Laptop Ubuntu16.04/14.04 安装Nvidia显卡驱动

笔记本型号 机械革命(MECHREVO)深海泰坦X6Ti-S(黑曜金)15.6英寸 CPU型号 i5-7300HQ 内存 8G 硬盘容量 128SSD+1T机械硬盘 显卡 GeForce GTX 1050 显存容量 4G 怎样选购用于Linux的笔记本电脑? 在笔记本上安装linux驱动问题主要发生在 GPU 和网卡上.网卡选 Intel 或者 Broadcom 就基本不会有问题了. 显卡推荐N卡,并且是 MUXed 的连接方式. 这里需要解释一个概念,MUXed vs MUXless 大家都知

新装Ubuntu18.04,配置NVIDIA显卡驱动+CUDA+CUDNN

首先显卡驱动 CUDA 选择配合显卡驱动的版本,具体可以参考https://blog.csdn.net/qq_27825451/article/details/89082978 CUDA下载地址为 https://developer.nvidia.com/cuda-downloads 下载后,运行 sudo bash cuda_9.1.85_387.26_linux.run 依次输入continue\accept,最后不要勾选显卡驱动(因为显卡驱动已经安装好了) 之后据弹出的Summary配置环