Workstation Setup Guide
Setup guide for the ultimate Deep Learning workstation, powered by NVIDIA
|Tool Guide||Sharing Guide||Kubernetes/Kubeflow Guide|
- Installing CUDA 9.2
- Installing cuDNN 7.1
- Building TensorFlow from source (optional)
- Using containers from NVIDIA GPU Cloud (NGC)
This guide is tested on Ubuntu 16.04.
Installing NVIDIA drivers + CUDA 9.2
Preparing the Ubuntu environment
- Open the Terminal (
ctrl + alt + T)
- Update Ubuntu by running
sudo apt update && sudo apt upgrade -y
- Install the SSH server by running
sudo apt install openssh-server -y
- Start the SSH service by running
sudo service ssh start
SSH allows you remote access to your workstation via the command line. This is extremely useful. You may now SSH into your workstation by running
ssh username@ip-address from a macOS or Linux terminal. If you are using Windows, you will require an SSH client such as PuTTY.
sudo apt-get install linux-image-generic linux-image-extra-virtual linux-source linux-headers-generic -y
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
Add in and save:
blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf sudo update-initramfs -u sudo reboot
Installing the NVIDIA drivers
The driver bundled with the CUDA toolkit will work perfectly until the next Ubuntu kernel update is performed, after which the driver may not functional properly. To ensure the driver remains functional across kernel updates, please install the NVIDIA driver the following way:
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update sudo apt install nvidia-396 -y && sudo reboot
A system reboot is recommended at this stage.
Installing the CUDA toolkit
- Download the CUDA package (
runfile) from NVIDIA’s developer site
- Download the cuDNN package from NVIDIA here. You will require a free developer account to download this package.
- Make sure that you can access these files on your workstation before proceeding.
- Navigate to the directory in which you stored the CUDA installer
- Open a command line at your current directory. On most desktop enviroments, you can right click and select “Open Terminal”.
sudo chmod +x *.run*to make the installers executable
- Run the installer using
- Follow the instructions and agree to everything except to install the NVIDIA drivers REPEAT: DO NOT INSTALL THE NVIDIA DRIVERS
After everything is done, reboot. If your display is not funky, then the NVIDIA drivers have been properly installed. To check the status of your GPUs, run
nvidia-smi in the Terminal.
Installing cuDNN 7.1
- Navigate to the directory in which you downloaded the cuDNN file archive.
- Extract the files into a folder (
- Copy the files to the correct directories:
sudo cp cuda/include/*.* /usr/local/cuda/include/
sudo cp cuda/lib64/*.* /usr/local/cuda/lib64/
sudo nano /etc/ld.so.confand add in the following lines:
cuDNN is now installed and working.
Building TensorFlow from source (optional)
Building TensorFlow from sources ensures that the binary you are using has been compiled with all the optimisations for your target platform. This can squeeze out a little more performance, depending on your system hardware. However, this might take up to a couple of hours.
- Update python base packages by running
sudo pip3 install pip setuptools wheel --upgrade
- Install the base Python data science stack by running
sudo pip3 install numpy scipy pandas sklearn matplotlib jupyter tensorflowWe will install TensorFlow just to ensure that all other dependencies are met. We will replace this TensorFlow with one that we compile ourselves.
- CUDA and cuDNN to be installed and functional.
- Install TensorFlow from pip to make sure all dependencies are met
For the current version of TensorFlow, you will also need to manually install NCCL.
TODO: NCCL install guide
The full instructions can be found on the TensorFlow webpage.
nvidia-docker allows you to run containers that can take full advantage of GPU compute to accelerate tasks. It requires CUDA to be installed on the host machine.
- Follow this guide to install
- Follow the instruction to install
Using containers from NVIDIA GPU Cloud (NGC)
TODO rough steps: https://ngc.nvidia.com/configuration/installers/cli register for account configure authentication for registry pull container run sample