Last active
          September 27, 2025 02:50 
        
      - 
            
      
        
      
    Star
      
          
          (850)
      
  
You must be signed in to star a gist  - 
              
      
        
      
    Fork
      
          
          (232)
      
  
You must be signed in to fork a gist  
- 
      
 - 
        
Save wangruohui/df039f0dc434d6486f5d4d098aa52d07 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
wangruohui revised this gist
Aug 29, 2017 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,24 +55,25 @@ sudo dpkg -P cuda-repo-ubuntu1404 ### Download the Driver The latest NVIDIA driver for Linux OS can be fetched from [NVIDIA's official website](http://www.nvidia.com/object/unix.html). The first one in the list, i.e. Latest Long Lived Branch version for Linux x86_64/AMD64/EM64T, is suitable for most case. If you want to down load the driver directly in a Linux shell, the script below would be useful. ``` cd ~ wget http://us.download.nvidia.com/XFree86/Linux-x86_64/384.69/NVIDIA-Linux-x86_64-384.69.run ``` Detailed installation instruction can be found in the download page via a [README](http://us.download.nvidia.com/XFree86/Linux-x86_64/384.69/README/index.html) hyperlink in the ADDITIONAL INFORMATION tab. I have also summarized key steps below. ### Install Dependencies Software required for the runfile are officially listed [here](http://us.download.nvidia.com/XFree86/Linux-x86_64/384.69/README/minimumrequirements.html). But this page seems to be stale and not easy to follow. For Ubuntu, installing the following dependencies is enough. 1. `build-essential` -- For building the driver 2. (Optional) `gcc-multilib` -- For providing 32-bit support 3. `dkms` -- For providing dkms support 4. (Optional) `xorg` and `xorg-dev`. On a workstation with GUI, this is require but usually have already been installed, because you have already got the graphic display. On headless servers without GUI, this is not a must. @@ -111,8 +112,8 @@ After above batch of preparition, we can eventually start excuting the runfile. ``` cd ~ chmod +x NVIDIA-Linux-x86_64-384.69.run sudo ./NVIDIA-Linux-x86_64-384.69.run --dkms -s ``` Note:  - 
        
wangruohui revised this gist
Aug 29, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the For ubuntu 14.04.5 LTS, the latest version is 352. To install the driver, excute `sudo apt-get nvidia-352 nvidia-modprobe`, and then reboot the machine. For ubuntu 16.04.3 LTS, the latest version is 375. To install the driver, excute `sudo apt-get nvidia-375 nvidia-modprobe`, and then reboot the machine. The `nvidia-modprobe` utility is used to load NVIDIA kernel modules and create NVIDIA character device files automatically everytime your machine boots up.  - 
        
wangruohui revised this gist
Aug 29, 2017 . No changes.There are no files selected for viewing
 - 
        
Ruohui Wang revised this gist
Dec 18, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,7 @@ As a summary, excuting `sudo apt-get install build-essential gcc-multilib dkms` Required packages for CentOS are `epel-release dkms libstdc++.i686`. Execute `yum install epel-release dkms libstdc++.i686`. Required packages for Fedora are `dkms libstdc++.i686 kernel-devel`. Execute `dnf install dkms libstdc++.i686 kernel-devel`. ### Creat Blacklist for Nouveau Driver  - 
        
Ruohui Wang revised this gist
Nov 6, 2016 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -92,8 +92,6 @@ options nouveau modeset=0 ``` Note: It is also possible for the NVIDIA installation runfile to creat this blacklist file automatically. Excute the runfile and follow instructions when an error realted Nouveau appears. Then, 1. for Ubuntu 14.04 LTS, reboot the computer; @@ -107,8 +105,6 @@ After the computer is rebooted. We need to stop the desktop manager before excut 1. For Ubuntu 14.04 / 16.04, excuting `sudo service lightdm stop` (or use `gdm` or `kdm` instead of `lightdm`) 2. For Ubuntu 16.04 / Fedora / CentOS, excuting `sudo systemctl stop lightdm` (or use `gdm` or `kdm` instead of `lightdm`) ### Excuting the Runfile After above batch of preparition, we can eventually start excuting the runfile. So this is why I, from the very begining, recommend new users to install the driver via `apt-get`.  - 
        
Ruohui Wang revised this gist
Nov 4, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via apt-get](#install-nvidia-graphics-driver-via-apt-get) @@ -31,7 +31,7 @@ It is recommended for new users to install the driver via this way because it is 1. The driver included in official Ubuntu repository is usually not the latest. 2. There would be some naming conflicts when other repositories (e.g. ones from CUDA) are added to the system. 3. One has to reinstall the driver after Linux kernel are updated. ## Install NVIDIA Graphics Driver via runfile  - 
        
Ruohui Wang revised this gist
Nov 4, 2016 . 1 changed file with 12 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -57,24 +57,24 @@ sudo dpkg -P cuda-repo-ubuntu1404 The latest driver for NVIDIA products can always be fetched from [NVIDIA's official website](http://www.nvidia.com/Download/index.aspx). It is not necessary to select all terms carefully. The driver provided for the same Product Series and Operating System is generally the same. For example, in order to find a driver for a GTX TITAN X graphics card, selecting GeForce 900 Series in Product Series and Linux 64-bit in Operating System is enough. If you want to down load the driver directly in a Linux shell, the script below would be useful. ``` cd ~ wget http://us.download.nvidia.com/XFree86/Linux-x86_64/367.57/NVIDIA-Linux-x86_64-367.57.run ``` Detailed installation instruction can be found in the download page via a [README](http://us.download.nvidia.com/XFree86/Linux-x86_64/367.57/README/index.html) hyperlink in the ADDITIONAL INFORMATION tab. I have also summarized key steps below. ### Install Dependencies Software required for the runfile are officially listed [here](http://us.download.nvidia.com/XFree86/Linux-x86_64/367.57/README/minimumrequirements.html). But this page seems to be stale and not easy to follow. For Ubuntu, installing the following dependencies is enough. 1. `build-essential` -- For building the driver 2. `gcc-multilib` -- For providing 32-bit support 3. `dkms` -- For providing dkms support 4. (Optional) `xorg` and `xorg-dev`. On a workstation with GUI, this is require but usually have already been installed, because you have already got the graphic display. On headless servers without GUI, this is not a must. As a summary, excuting `sudo apt-get install build-essential gcc-multilib dkms` to install all dependencies. @@ -92,6 +92,8 @@ options nouveau modeset=0 ``` Note: It is also possible for the NVIDIA installation runfile to creat this blacklist file automatically. Excute the runfile and follow instructions when an error realted Nouveau appears. Note: It seems this step be not required for driver version 367.57. Then, 1. for Ubuntu 14.04 LTS, reboot the computer; @@ -105,22 +107,24 @@ After the computer is rebooted. We need to stop the desktop manager before excut 1. For Ubuntu 14.04 / 16.04, excuting `sudo service lightdm stop` (or use `gdm` or `kdm` instead of `lightdm`) 2. For Ubuntu 16.04 / Fedora / CentOS, excuting `sudo systemctl stop lightdm` (or use `gdm` or `kdm` instead of `lightdm`) Note: It seems this step be not required for driver version 367.57. ### Excuting the Runfile After above batch of preparition, we can eventually start excuting the runfile. So this is why I, from the very begining, recommend new users to install the driver via `apt-get`. ``` cd ~ chmod +x NVIDIA-Linux-x86_64-367.57.run sudo ./NVIDIA-Linux-x86_64-367.57.run --dkms -s ``` Note: 1. option `--dkms` is used for register dkms module into the kernel so that update of the kernel will not require a reinstallation of the driver. This option should be turned on by default. 2. option `-s` is used for silent installation which should used for batch installation. For installation on a single computer, this option should be turned off for more installtion information. 3. option `--no-opengl-files` can also be added if non-NVIDIA (AMD or Intel) graphics are used for display while NVIDIA graphics are used for display. 4. The installer may prompt warning on a system without X.Org installed. It is safe to ignore that based on my experience. ``` WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system. If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver. ```  - 
        
Ruohui Wang revised this gist
Sep 21, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ In this article, I will share some of my experience on installing the NVIDIA dri ## Table of Contents - [Install NVIDIA Graphics Driver via apt-get](#install-nvidia-graphics-driver-via-apt-get) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations (Important)](#remove-previous-installations--important-) * [Download the Driver](#download-the-driver) * [Install Dependencies](#install-dependencies) * [Creat Blacklist for Nouveau Driver](#creat-blacklist-for-nouveau-driver) @@ -37,7 +37,7 @@ It is recommended for new users to install the driver via this way because it is For advanced user who wants to get the latest version of the driver, get rid of the reinstallation issue caused bby dkms, or using Linux distributions that do not have nvidia drivers provided in the repositories, installing from runfile is recommended. ### Remove Previous Installations (Important) One might have installed the driver via `apt-get`. So before reinstall the driver from runfile, uninstalling previous installations is required. Executing the following scripts carefully one by one.  - 
        
Ruohui Wang revised this gist
Sep 20, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -178,4 +178,5 @@ It is also recommended for Ubuntu users to append string `/usr/local/cuda/bin` t ## Install cuDNN The recommended way for installing cuDNN is to first copy the `tgz` file to `/usr/local` and then extract it, and then remove the `tgz` file if necessary. This method will preserve symbolic links. At last, execute `sudo ldconfig` to update the shared library cache.  - 
        
Ruohui Wang revised this gist
Sep 20, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ In this article, I will share some of my experience on installing the NVIDIA dri * [Common Errors and Solutions](#common-errors-and-solutions) * [Additional Notes](#additional-notes) - [Install CUDA](#install-cuda) - [Install cuDNN](#install-cudnn) <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> @@ -176,6 +176,6 @@ sudo ldconfig It is also recommended for Ubuntu users to append string `/usr/local/cuda/bin` to system file `/etc/environments` so that `nvcc` will be included in `$PATH`. This will take effect after reboot. ## Install cuDNN The recommended way for installing cuDNN is to first copy the `tgz` file to `/usr/local` and then extract it, and then remove the `tgz` file if necessary. This method will preserve symbolic links.  - 
        
Ruohui Wang revised this gist
Sep 6, 2016 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,14 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via apt-get](#install-nvidia-graphics-driver-via-apt-get) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver) * [Install Dependencies](#install-dependencies) * [Creat Blacklist for Nouveau Driver](#creat-blacklist-for-nouveau-driver) * [Stop lightdm/gdm/kdm](#stop-lightdm-gdm-kdm) * [Excuting the Runfile](#excuting-the-runfile) * [Check the Installation](#check-the-installation) * [Common Errors and Solutions](#common-errors-and-solutions) * [Additional Notes](#additional-notes) @@ -18,7 +17,6 @@ In this article, I will share some of my experience on installing the NVIDIA dri <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> ## Install NVIDIA Graphics Driver via apt-get In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command.  - 
        
Ruohui Wang revised this gist
Sep 4, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -176,6 +176,8 @@ sudo bash -c "echo /usr/local/cuda/lib64/ > /etc/ld.so.conf.d/cuda.conf" sudo ldconfig ``` It is also recommended for Ubuntu users to append string `/usr/local/cuda/bin` to system file `/etc/environments` so that `nvcc` will be included in `$PATH`. This will take effect after reboot. ## Install cnDNN The recommended way for installing cuDNN is to first copy the `tgz` file to `/usr/local` and then extract it, and then remove the `tgz` file if necessary. This method will preserve symbolic links.  - 
        
Ruohui Wang revised this gist
Sep 4, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -109,7 +109,7 @@ After the computer is rebooted. We need to stop the desktop manager before excut ### Excuting the Runfile After above batch of preparition, we can eventually start excuting the runfile. So this is why I, from the very begining, recommend new users to install the driver via `apt-get`. ``` cd ~  - 
        
Ruohui Wang revised this gist
Sep 2, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -163,7 +163,11 @@ To extract above three components, one can execute the runfile installer with `- Scripts for installing CUDA Toolkit are summarized below. ``` cd ~ wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run chmod +x cuda_7.5.18_linux.run ./cuda_7.5.18_linux.run --extract=$HOME sudo ./cuda-linux64-rel-7.5.18-19867135.run ``` After the installation finishes, configure runtime library.  - 
        
Ruohui Wang revised this gist
Sep 2, 2016 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -163,11 +163,7 @@ To extract above three components, one can execute the runfile installer with `- Scripts for installing CUDA Toolkit are summarized below. ``` ``` After the installation finishes, configure runtime library.  - 
        
Ruohui Wang revised this gist
Sep 2, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -166,7 +166,7 @@ Scripts for installing CUDA Toolkit are summarized below. cd ~ wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run chmod +x cuda_7.5.18_linux.run ./cuda_7.5.18_linux.run --extract=`~` sudo ./cuda-linux64-rel-7.5.18-19867135.run ```  - 
        
Ruohui Wang revised this gist
Aug 31, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -153,6 +153,7 @@ These commands can be added to `/etc/rc.local` for excuting at system boot. Installing CUDA from runfile is much simpler and smoother than installing the NVIDIA driver. It just involves copying files to system directories and has nothing to do with the system kernel or online compilation. Removing CUDA is simply removing the installation directory. So I personally does not recommend adding NVIDIA's repositories and install CUDA via `apt-get` or other package managers as it will not reduce the complexity of installation or uninstallation but increase the risk of messing up the configurations for repositories. The CUDA runfile installer can be downloaded from [NVIDIA's websie](https://developer.nvidia.com/cuda-downloads). But what you download is a package the following three components: 1. an NVIDIA driver installer, but usually of stale version; 2. the actual CUDA installer; 3. the CUDA samples installer;  - 
        
Ruohui Wang revised this gist
Aug 31, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,9 +80,9 @@ For Ubuntu, installing the following dependencies is enough. As a summary, excuting `sudo apt-get install build-essential gcc-multilib dkms` to install all dependencies. Required packages for CentOS are `epel-release dkms libstdc++.i686`. Execute `yum install epel-release dkms libstdc++.i686`. Required packages for Fedora are `dkms libstdc++.i686`. Execute `dnf install dkms libstdc++.i686`. ### Creat Blacklist for Nouveau Driver  - 
        
Ruohui Wang revised this gist
Aug 31, 2016 . No changes.There are no files selected for viewing
 - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -107,7 +107,7 @@ After the computer is rebooted. We need to stop the desktop manager before excut 1. For Ubuntu 14.04 / 16.04, excuting `sudo service lightdm stop` (or use `gdm` or `kdm` instead of `lightdm`) 2. For Ubuntu 16.04 / Fedora / CentOS, excuting `sudo systemctl stop lightdm` (or use `gdm` or `kdm` instead of `lightdm`) ### Excuting the Runfile After above batch of preparition, we can eventually start excuting the runfile. So this is why, I, from the very begining, recommend new users to install the driver via `apt-get`.  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,8 +133,8 @@ After a succesful installation, `nvidia-smi` command will report all your CUDA-c ### Common Errors and Solutions 1. `ERROR: Unable to load the 'nvidia-drm' kernel module.` * One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved. ### Additional Notes  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,8 +133,8 @@ After a succesful installation, `nvidia-smi` command will report all your CUDA-c ### Common Errors and Solutions - `ERROR: Unable to load the 'nvidia-drm' kernel module.` * One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved. ### Additional Notes  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,24 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Table of Contents](#table-of-contents) - [Install NVIDIA Graphics Driver via apt-get](#install-nvidia-graphics-driver-via-apt-get) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver) * [Install Dependencies](#install-dependencies) * [Creat Blacklist for Nouveau Driver](#creat-blacklist-for-nouveau-driver) * [Stop lightdm/gdm/kdm](#stop-lightdm-gdm-kdm) * [Excuting the runfile](#excuting-the-runfile) * [Check the Installation](#check-the-installation) * [Common Errors and Solutions](#common-errors-and-solutions) * [Additional Notes](#additional-notes) - [Install CUDA](#install-cuda) - [Install cnDNN](#install-cndnn) <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> ## Install NVIDIA Graphics Driver via apt-get In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command. @@ -128,8 +133,8 @@ After a succesful installation, `nvidia-smi` command will report all your CUDA-c ### Common Errors and Solutions 1. ERROR: Unable to load the 'nvidia-drm' kernel module. - One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved. ### Additional Notes  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -127,8 +127,9 @@ WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and After a succesful installation, `nvidia-smi` command will report all your CUDA-capable devices in the system. ### Common Errors and Solutions - ERROR: Unable to load the 'nvidia-drm' kernel module. * One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved. ### Additional Notes  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -127,6 +127,8 @@ WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and After a succesful installation, `nvidia-smi` command will report all your CUDA-capable devices in the system. ### Common Errors and Solutions 1. ERROR: Unable to load the 'nvidia-drm' kernel module. One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved. ### Additional Notes  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via `apt-get`](#install-nvidia-graphics-driver-via-apt-get) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver) * [Install Dependencies](#install-dependencies) * [Creat Blacklist for Nouveau Driver](#creat-blacklist-for-nouveau-driver) * [Stop `lightdm`/`gdm`/`kdm`](#stop-lightdm-gdm-kdm) * [Excuting the runfile](#excuting-the-runfile) * [Check the Installation](#check-the-installation) * [Additional Notes](#additional-notes) @@ -95,7 +95,7 @@ Then, 2. for Ubuntu 16.04 LTS, excute `sudo update-initramfs -u` and reboot the computer; 3. for CentOS/Fedora, excute `sudo dracut --force` and reboot the computer. ### Stop lightdm/gdm/kdm After the computer is rebooted. We need to stop the desktop manager before excuting the runfile to install the driver. `lightdm` is the default desktop manager in Ubuntu. If GNOME or KDE desktop environment is used, installed desktop manager will then be `gdm` or `kdm`. @@ -117,11 +117,17 @@ Note: 1. option `--dkms` is used for register dkms module into the kernel so that update of the kernel will not require a reinstallation of the driver. This option should be turned on by default. 2. option `-s` is used for silent installation which should used for batch installation. For installation on a single computer, this option should be turned off for more installtion information. 3. option `--no-opengl-files` can also be added if non-NVIDIA (AMD or Intel) graphics are used for display while NVIDIA graphics are used for display. 4. The installer may prompt warning on a system without X.Org installed. It is safe to ignore that. ``` WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system. If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver. ``` ### Check the Installation After a succesful installation, `nvidia-smi` command will report all your CUDA-capable devices in the system. ### Common Errors and Solutions ### Additional Notes `nvidia-smi -pm 1` can enable the persistent mode, which will save some time from loading the driver. It will have significant effect on machines with more than 4 GPUs.  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ In this article, I will share some of my experience on installing the NVIDIA dri - [Install CUDA](#install-cuda) - [Install cnDNN](#install-cndnn) ## Install NVIDIA Graphics Driver via apt-get In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command.  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via `apt-get`](#install-nvidia-graphics-driver-via-apt-get-) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver) @@ -14,12 +14,6 @@ In this article, I will share some of my experience on installing the NVIDIA dri - [Install CUDA](#install-cuda) - [Install cnDNN](#install-cndnn) ## Install NVIDIA Graphics Driver via `apt-get` In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command.  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via `apt-get`](#install-nvidia-graphics-driver-via-`apt-get`-) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver)  - 
        
Ruohui Wang revised this gist
Aug 30, 2016 . 1 changed file with 11 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,8 @@ In this article, I will share some of my experience on installing the NVIDIA driver and CUDA. I will mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can. ## Table of Contents - [Install NVIDIA Graphics Driver via `apt-get`](#install-nvidia-graphics-driver-via--apt-get-) - [Install NVIDIA Graphics Driver via runfile](#install-nvidia-graphics-driver-via-runfile) * [Remove Previous Installations](#remove-previous-installations) * [Download the Driver](#download-the-driver) * [Install Dependencies](#install-dependencies) @@ -17,13 +11,16 @@ In this article, I will share some of my experience on installing the NVIDIA dri * [Excuting the runfile](#excuting-the-runfile) * [Check the Installation](#check-the-installation) * [Additional Notes](#additional-notes) - [Install CUDA](#install-cuda) - [Install cnDNN](#install-cndnn) <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> <small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small> ## Install NVIDIA Graphics Driver via `apt-get` In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command. @@ -39,7 +36,7 @@ It is recommended for new users to install the driver via this way because it is 2. There would be some naming conflicts when other repositories (e.g. ones from CUDA) are added to the system. 3. One has to reinstall the driver when Linux kernel are updated. ## Install NVIDIA Graphics Driver via runfile For advanced user who wants to get the latest version of the driver, get rid of the reinstallation issue caused bby dkms, or using Linux distributions that do not have nvidia drivers provided in the repositories, installing from runfile is recommended. @@ -143,7 +140,7 @@ After a succesful installation, `nvidia-smi` command will report all your CUDA-c These commands can be added to `/etc/rc.local` for excuting at system boot. ## Install CUDA Installing CUDA from runfile is much simpler and smoother than installing the NVIDIA driver. It just involves copying files to system directories and has nothing to do with the system kernel or online compilation. Removing CUDA is simply removing the installation directory. So I personally does not recommend adding NVIDIA's repositories and install CUDA via `apt-get` or other package managers as it will not reduce the complexity of installation or uninstallation but increase the risk of messing up the configurations for repositories. @@ -170,6 +167,6 @@ sudo bash -c "echo /usr/local/cuda/lib64/ > /etc/ld.so.conf.d/cuda.conf" sudo ldconfig ``` ## Install cnDNN The recommended way for installing cuDNN is to first copy the `tgz` file to `/usr/local` and then extract it, and then remove the `tgz` file if necessary. This method will preserve symbolic links.  
NewerOlder