Editing
Tutorials:Install the nVidia docker system
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Installing the nVidia docker extension == The default docker installation is not able to talk to the nVidia GPUs present in your system. Thus, you have to install an extension by nVidia which allows it to do so. Run the following script: <syntaxhighlight lang="bash"> #!/bin/bash curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ sudo apt-key add - # hard-coded distro ID so that it also works on Ubuntu flavors like Mint # ubuntu16.04 is also available, maybe some other versions (see above github) distribution=ubuntu18.04 curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ sudo tee /etc/apt/sources.list.d/nvidia-docker.list sudo apt-get update # Install nvidia-docker2 and reload the Docker daemon configuration sudo apt-get install -y nvidia-docker2 sudo systemctl restart docker </syntaxhighlight> That's it, your system is now configured to run nVidia's base containers for GPU utilization. To test it and actually run your first container, try out: <syntaxhighlight lang="bash"> docker run --runtime=nvidia nvidia/cuda:9.0-devel nvcc --version </syntaxhighlight> This will pull the docker container with CUDA 9.0 and run the command "nvcc --version" inside it. In effect, you should see a similar output as on your own system, but with a different version of CUDA displayed. You can also try to run nvidia-smi inside the container: <syntaxhighlight lang="bash"> docker run --runtime=nvidia nvidia/cuda:9.0-devel nvidia-smi </syntaxhighlight> This should show a similar output as when you run it directly, i.e. show the same graphics card(s).
Summary:
Please note that all contributions to Collective Computational Unit may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CCU:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Collective Computational Unit
Main page
Projects
Tutorials
GPU Cluster
Core Facilitys
Mediawiki
Recent changes
Random page
Help
Tools
What links here
Related changes
Page information