Ref Link:
https://github.com/dusty-nv/jetson-inference#system-setup
Installing the NVIDIA driver
Add the NVIDIA Developer repository and install the NVIDIA driver.
$ sudo apt-get install -y apt-transport-https curl build-essential
$ cat <<EOF | sudo tee /etc/apt/sources.list.d/cuda.list > /dev/null
deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /
EOF
$ curl -s \
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub \
| sudo apt-key add -
$ cat <<EOF | sudo tee /etc/apt/preferences.d/cuda > /dev/null
Package: *
Pin: origin developer.download.nvidia.com
Pin-Priority: 600
EOF
$ sudo apt-get update && sudo apt-get install -y --no-install-recommends cuda-drivers
$ sudo reboot
After reboot, check if you can run nvidia-smi
and see if your GPU shows up.
$ nvidia-smi
Thu May 31 11:56:44 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.30 Driver Version: 390.30 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro GV100 Off | 00000000:01:00.0 On | Off |
| 29% 41C P2 27W / 250W | 1968MiB / 32506MiB | 22% Default |
+-------------------------------+----------------------+----------------------+
Installing Docker
Install prerequisites, install the GPG key, and add the Docker repository.
$ sudo apt-get install -y ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Add the Docker Engine Utility (nvidia-docker2) repository, install nvidia-docker2, set up permissions to use Docker without sudo each time, and then reboot the system.
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
$ curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu16.04/amd64/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
$ sudo apt-get update
$ sudo apt-get install -y nvidia-docker2
$ sudo usermod -aG docker $USER
$ sudo reboot
NGC Sign-up
Sign up to NGC if you have not.
https://ngc.nvidia.com/signup/register
Generate your API key, and save it somewhere safe. You will use this soon later.
Setting up data and job directory for DIGITS
Back on you PC (after reboot), log in to the NGC container registry
$ docker login nvcr.io
You will be prompted to enter Username and Password
Username: $oauthtoken
Password: <Your NGC API Key>
For a test, use CUDA container to see if the nvidia-smi shows your GPU.
docker run --runtime=nvidia --rm nvcr.io/nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 nvidia-smi
Setting up data and job directories
Create data and job directories on your host PC, to be mounted by DIGITS container.
$ mkdir /home/username/data
$ mkdir /home/username/digits-jobs
Starting DIGITS container
$ nvidia-docker run --name digits -d -p 8888:5000 \
-v /home/username/data:/data:ro
-v /home/username/digits-jobs:/workspace/jobs nvcr.io/nvidia/digits:18.05
Open up a web browser and access http://localhost:8888