Adding package repositories

Now we've removed all of the older versions of NVIDIA-Docker. it's time to add the keys and repository to the typical apt-get repositories that you can pull from. First, in the Installing NVIDIA-Docker recipe, we need to add the appropriate key for  apt-get to communicate with the NVIDIA-Docker repository:

curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | 
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)

After adding the key, we add the repo to the sources that apt-get can pull from when installing packages:

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

Finally, an apt-get update allows apt-get to update its list of installable packages. Since we just added a new repository, the update will allow us to install the NVIDIA-Docker repository in the next step:

sudo apt-get update

Now we move on to the next step.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.213.212