CentOS 7中以runfile形式安装CUDA 9.0

GPU: NVIDIA Tesla K40C

Enter the ‘root‘ mode:

$ su -

1. Pre-installation

1.1 Verify you have a CUDA-capable GPU

$ lspci | grep -i nvidia

1.2 Verify you have a supported version of Linux

$ uname -m && cat /etc/*release

1.3 Verify the system has gcc installed

$ gcc --version

1.4 Verify the system has the correct kernel headers and development packages installed

$ uname -r

Note: If you perform a system update which changes the version of the linux kernel being used, make sure to rerun the commands below to ensure you have the correct kernel headers and kernel development packages installed. Otherwise, the CUDA Driver will fail to work with the new kernel.

$ yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

2. Runfile installation

2.1 Disable the Nouveau drivers

The Nouveau drivers are loaded if the following command prints anything:

$ lsmod | grep nouveau

To disable the Nouveau drivers, creating a file at "/usr/lib/modprobe.d/blacklist-nouveau.conf" with following content:

blacklist nouveau

options nouveau modeset=0

Then regenerate the kernel inittramfs:

$ dracut --force

2.2 Reboot into the text mode (runlevel 3)

$ systemctl set-default multi-user.target

$ init 3

$ reboot

2.3 Run the CUDA toolkit installer

$ sh cuda_<version>_linux.run --no-opengl-libs

Note:

(1) If installing the driver, the installer will also ask if the openGL libraries should be installed. If the GPU used for display is not an NVIDIA GPU, the NVIDIA openGL libraries should not be installed. Otherwise, the openGL libraries used by the graphics driver of the non-NVIDIA GPU will be overwritten and the GUI will not work. If performing a silent installation, the --no-opengl-libs option should be used to prevent the openGL libraries from being installed. See the Advanced Options section for more details.

(2) If the GPU used for display is an NVIDIA GPU, the X server configuration file, /etc/X11/xorg.conf, may need to be modified. In some cases, nvidia-xconfig can be used to automatically generate a xorg.conf file that works for the system. For non-standard systems, such as those with more than one GPU, it is recommended to manually edit the xorg.conf file. Consult the xorg.conf documentation for more information.

2.4 Reboot into the graphical mode (runlevel 5)

$ systemctl set-default graphical.target

$ init 5

3. Post-installation actions

3.1 Environment setup

$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}

To change the environment variables for 64-bit operating systems:

$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

3.2 Install Third-party libraries

$ yum install freeglut-devel libX11-devel libXi-devel libXmu-devel \ make mesa-libGLU-devel

3.3 Verify the installation

(1) Verify Nvidia driver

$ cat /proc/driver/nvidia/version

$ nvidia-smi    // NVIDIA System Management Interface: It allows administrators to query GPU device state.

(2) Verify the cuda compiler

$ nvcc --version / nvcc -V

3.4 Compiler CUDA examples

Enter the "~/NVIDIA_CUDA-9.0_Samples" directory, type "make" command to run the "Makefile" file.

After compilation, then enter the "~/NVIDIA_CUDA-9.0_Samples/bin" directory to find and run the "deviceQuery" executable file.

This command shows the information of GPU device.

时间: 2024-11-15 06:38:43

CentOS 7中以runfile形式安装CUDA 9.0的相关文章

Ubuntu 16.04 上安装 CUDA 9.0 详细教程

https://blog.csdn.net/QLULIBIN/article/details/78714596 前言: 本篇文章是基于安装CUDA 9.0的经验写,CUDA9.0目前支持Ubuntu16.04和Ubuntu17.04两个版本,如下图所示(最下面的安装方式我们选择第一个,即runfile方式): 大家可以先将CUDA文件下载下来,但是最好不要急于安装,一定要先将NVIDIA给出官方指导手册仔细看一下,然后再找几篇好的博客看一下,大致了解一下CUDA的安装过程,对安装过程中可能出现的

ubuntu16.04安装CUDA 8.0(很详尽,包括一些坑的解决方法)

每次配置环境都头疼得要死,总是会遇到各种各样的问题,这次决心一劳永逸地解决这个问题,踩最多的坑,装最稳的环境. 先介绍用于测试的电脑:操作系统是在清华镜像上下载的ubuntu16.04LTS,内核版本是4.15.0-29-generic,电脑是联想Y430P,显卡我没记错的话是GTX850M. 本篇绝大部分操作需要管理员权限,即sudo,也许不把cuda安装到/usr/lib而是自己的home目录下可以不用sudo权限,但我没有尝试,有兴趣的可以自己尝试一下. 一.更换内核 CUDA8.0最高仅

卸载cuda-9.1.deb 安装cuda 8.0

GA2版本的,下图官方给的命令,在这里说一下,用apt的时候,要指明install的版本cuda-8-0与cuda-9-1会莫热男装9-1所以如果诺你安装过9.1并且没有移动他的安装包,那么你在apt安装的时候要改下下图的第三条命令 sudo apt-get install cuda-8-0 如果你用的deb安装,可以不用卸载以前的deb9.1,直接用更改过得123命令. 如果你不更改请看下图区别.会执行安装9.1 原文地址:https://www.cnblogs.com/SweetBeens/

Ubuntu16.04 安装配置 Caffe 过程 (GPU版+CUDA 9.0+cuDNN 9.0+OpenCV 3.4.1)

虽然 Caffe 的官网已经有比较详细的针对 Ubuntu 的安装教程,但是要配置可以使用 GPU 的 Caffe 需要的依赖太多,包括 CUDA,cuDNN,OpenCV 等.参考了网上的很多教程,但在自己的配置中依旧出现了各种各样的意想不到的坑,所以在此记录一下自己配置 Caffe 的过程,以供参考.因为是配置完成后以回忆的形式做的记录,所以可能会有细节上的遗漏,还请见谅. 安装 Nvidia 驱动 1. 查询 NVIDIA 显卡驱动 去官网查询自己的显卡对应的驱动 http://www.n

Ubuntu 18.04上CUDA 9.0、cuDNN7.0及Tensorflow 1.8的安装

配置 笔者使用Dell Inspiron 7559笔记本电脑,显卡为NVIDIA GTX 960M. 目标 由于本机显卡仅有nvidia-384驱动包能够良好支持(nvidia-387.nvidia-390包均在本机出现了系统无法登陆等异常),而CUDA 9.1需要驱动至少为nvidia-387,故选择安装CUDA 9.0及cuDNN7.0. TelsorFlow 1.8完全支持CUDA 9.0因此可以使用最新版. 安装显卡驱动 使用apt安装nvidia-384驱动包(实际安装驱动为390):

在CentOS 7中安装nginx服务器

简要地介绍一下,如何在CentOS 7中安装nginx服务器  下载对应当前系统版本的nginx包(package) # wget  http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm  建立nginx的yum仓库 # rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm  下载并安装nginx # yum inst

如何在 CentOS 7 中安装、配置和安全加固 FTP 服务

步骤 1:安装 FTP 服务器 1. 安装 vsftpd 服务器很直接,只要在终端运行下面的命令. # yum install vsftpd 2. 安装完成后,服务先是被禁用的,因此我们需要手动启动,并设置在下次启动时自动启用: # systemctl start vsftpd # systemctl enable vsftpd 3. 接下来,为了允许从外部系统访问 FTP 服务,我们需要打开 FTP 守护进程监听的 21 端口: # firewall-cmd --zone=public --p

CentOS 6 中安装Node.js 4.0 版本或以上

如果想在CentOS 6 中安装Node.js >4.0,如果通过以往的方式安装: wget https://nodejs.org/dist/latest/node-v4.0.0.tar.xz tar zvxf node-v4.0.0.tar.xz cd node-v4.0.0 ./configure make && make install 会遇到报错提示: WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CX

通过tarball形式安装HBASE Cluster(CDH5.0.2)——配置分布式集群中的YARN ResourceManager 的HA

<?xml version="1.0"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses