PC GPU Setup Guide

Installation requirements for Ubuntu server – GPU:

Please Note:

  • An Internet connection is needed to perform many of the following steps

  • Many of the following command lines will require your system’s root or superuser password

If Ubuntu has not been installed, please use this link here. If Ubuntu has been previously installed, please skip to the next step.

 

1. Install Nvidia Driver

  • After installing and setting up Ubuntu, enter the following script in a command prompt to ensure your Ubuntu is up to date.

sudo apt update

 

  • Enter the following script in a command prompt to check for Ubuntu upgrades.

sudo apt upgrade
  • Enter the following script in a command prompt to show all driver packages that apply to the current system.

sudo ubuntu-drivers devices

 

2. NVIDIA GPU:

  • Enter the following script to check your NVIDIA GPU’s status.

nvidia-smi
  • Enter the following script to update your NVIDIA GPU’s drivers.

sudo apt install nvidia-driver-xxx ( which is recommended )
  • Enter the following script to install curl (data transfer tool).

sudo apt install curl
  • Enter the following script to install Docker-CE (SW package installer) via  Docker’s convenience script.

curl https://get.docker.com | sh 

&& sudo systemctl --now enable docker
  • Enter the following script to set up a stable repository (binary packages) and GPG key (encryption).

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 

&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - 

&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

 

3. Updates and Installers

  • Enter the following script to update Ubuntu

sudo apt-get update
  • Enter the following script to update NVIDIA dockers.

sudo apt-get install -y nvidia-docker2
  • Enter the following script to restart the Docker daemon (container) to complete the installation.

sudo systemctl restart docker
  • Enter the following script to test NVIDIA docker installation.

sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi


Once set up is complete, continue onto HERE.