CUDA Usage in Docker and What is nvidia-docker plugin

Hi,

I googled that “Do I have to install Cuda on my host system to use it in docker?” and I saw different answers for that. So, I am not sure what to do.

  1. I have installed only nvidia-driver in my host, in addition of course, installed docker and nvidia-docker. Is it enough to pull and run cuda from hub repository? Do I need cuda in my host?

  2. Also, I have read about nvidia-docker and nvidia-docker-plugin on https://github.com/NVIDIA/nvidia-docker/wiki/nvidia-docker-plugin, however, I could not get what nvidia-docker-plugin is. Is it a need, must or something else after installation of nvidia-docker?

Kind regards, Ender.

You do NOT need to install CUDA on the host system in order to use CUDA in a Docker container. All you need is:

  1. CUDA driver
  2. Docker
  3. either nvidia-docker or nvidia-docker-plugin

nvidia-docker (also known as nvidia-docker 1.0) is an application that sets up Docker to be able to run CUDA-capable containers. The Docker application is then forked from the running nvidia-docker application.

nvidia-docker-plugin is a Docker engine plugin that replaces the nvidia-docker 1.0 application. The logic that was in the nvidia-docker application has been copied in to a library and is loaded by the Docker application.

You could use either nvidia-docker or nvidia-docker-plugin but nvidia-docker-plugin is supported and should you have any problems you can post to the github issues page.