Nvidia Drivers - HerbFargus/Raspberry-Pi-Scripts GitHub Wiki

On Ubuntu 18.04: Linux Mint 19.1

  • Disable Secure Boot
  • Install Nvidia Repository
  • Update Drivers/CUDA
  • Install Python/Pytorch
  • Install ESRGAN

Nvidia Repository:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

Check Recommended Drivers:

$ ubuntu-drivers devices

Install Drivers:

$ sudo ubuntu-drivers autoinstall

or

$ sudo ubuntu-drivers nvidia-415

Disable MOK Secure Boot:

sudo apt-get install mokutil
sudo mokutil --disable-validation

Install CUDA tools:

sudo apt-get install nvidia-cuda-toolkit

reboot

Verify nvidia is running

nvidia-smi

Install Python 3:

Anaconda is a simple way o do it: https://www.anaconda.com/download/#linux

bash Anaconda3-2018.12-Linux-x86_64.sh

Install Pytorch:

Pytorch.org:

conda install pytorch torchvision cuda100 -c pytorch

sudo apt-get install python-pip
pip install numpy opencv-python

Install ESRGAN:

git clone https://github.com/xinntao/ESRGAN.git

Download Samples from https://drive.google.com/drive/u/0/folders/17VYV_SoZZesU6mbxz2dMAIccSSlqLecY

Test:

python test.py models/RRDB_ESRGAN_x4.pth