Difference between revisions of "Tutorials:Install the nVidia docker system"
m |
|||
| Line 6: | Line 6: | ||
== Install the correct docker version == | == Install the correct docker version == | ||
| − | Unfortunately, the docker version available with the usual package manager is incompatible with the nVidia docker tools. Thus, we have to install a version directly from the repositories. The | + | Unfortunately, the docker version available with the usual package manager is incompatible with the nVidia docker tools. Thus, we have to install a version directly from the repositories. The following script (which needs sudo privileges to run) shows you how. |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 22: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | Note that the string "bionic" is the output of the command "lsb_release -cs". If you have | + | Note that the string "bionic" is the output of the command "lsb_release -cs". If you have another version of Ubuntu than 18.04, you can try to replace "bionic" with the output of this command, but it might not be supported. On a derivative Linux, this does not work, and you need to find out the correct Ubuntu lsb release by consulting their documentation. Do the same for similar occurences in scripts further below. |
| − | |||
| + | Post install, you have to allow docker access for your account. Note that this comes which a bunch of privileges which are essentially equivalent to admin rights on your machine. Thus, some guides recommend to set up a special user account for this. Anyway, assign the respective rights by adding your user to the docker group: | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | sudo usermod -aG docker $USER | ||
| + | </syntaxhighlight> | ||
Revision as of 14:43, 18 May 2019
Overview
In order to run containers which make use of the GPUs on your system, you need to install a specific docker container infrastructure on your system. This guide walks you through the necessary steps.
Install the correct docker version
Unfortunately, the docker version available with the usual package manager is incompatible with the nVidia docker tools. Thus, we have to install a version directly from the repositories. The following script (which needs sudo privileges to run) shows you how.
#!/bin/bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
bionic \
stable"
sudo apt-get update
sudo apt-get install -y docker-ce
Note that the string "bionic" is the output of the command "lsb_release -cs". If you have another version of Ubuntu than 18.04, you can try to replace "bionic" with the output of this command, but it might not be supported. On a derivative Linux, this does not work, and you need to find out the correct Ubuntu lsb release by consulting their documentation. Do the same for similar occurences in scripts further below.
Post install, you have to allow docker access for your account. Note that this comes which a bunch of privileges which are essentially equivalent to admin rights on your machine. Thus, some guides recommend to set up a special user account for this. Anyway, assign the respective rights by adding your user to the docker group:
sudo usermod -aG docker $USER