Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.93 KB

nvidia.md

File metadata and controls

58 lines (42 loc) · 1.93 KB

Nvidia drivers installation

I followed the advanced instructions provided on this Gist but it failed. Therefore I ran the following commands

sudo apt purge nvidia*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-381
#sudo systemctl stop lightdm
#sudo systemctl start lightdm

This requires to disable secure boot. Reboot without secure boot.

Check whether it works with

nvidia-smi

You must see a table with driver informations.

Cuda installation

Go to this page. Download the .deb file corresponding to your system and follow the instructions. Make sure to still use the driver "nvidia-381" after Cuda installation (go to "Softwares and Updates", then "additional drivers"). You may have to reboot (in insecure mode) your computer. Check that nvidia-smi is still working.

In your .bashrc (or .zshrc ...) add the following lines

export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

CUDNN bindings installation

Download cudnn binding here and put the lib64 folder into your LD_LIBRARY_PATH: (I named the downloaded folder cuda-cudnn)

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-cudnn/lib64

Torch GPU support installation

If Torch is not yet installed on your system, go to the Torch installation page and follow the instructions. Normally the installation process will detect CUDA and install cutorch, cunn and cudnn.

Otherwise if Torch is already installed, run

luarocks install cutorch cunn cudnn

To see if it worked launch Torch and import cutorch, cunn and cudnn:

Run th and

require 'cutorch'
require 'cunn'
require 'cudnn'