Create Docker Container with GPU cards


Last few days,I need a docker coinainer with Nvidia GPU cards.Nvidia released a special docker version with usage for Nvidia GPU cards.And Nvidia has a driver what name is CUDA driver.You can use GPU cards on running container using this driver.

You can examine and install below github adress.

To begin with,I start the control of my GPU cards.


Later,I create a variable on my profile file for docker usage.

export DOCKER_BINARY=nvidia-docker

Then,I create a docker container with below command.

NV_GPU=1 $DOCKER_BINARY run -p 5555:22 -dti --env LICENSE=yes baseimage
#I use second GPU card.When I want to use 2 gpu cards,I will use below command

Check with docker ps command.

ssh -p 5555 emre@


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.