Cuda can not work in container

(Ran) #1

I tested cuda samples in administor, and it works, but it failed in container.

(Stéphane Graber) #2

CUDA can work fine in containers, but you need to configure your container properly to have access to the relevant devices and libraries.

LXD makes that reasonably easy, if using LXC, a bit more work is involved but the NVIDIA folks did a very good job with the nvidia hook which does most of this work for you.



Can you tell us what instructions are you following?
There are instructions at
But for Ubuntu 18.04 the packages are found in the repositories so it’s even easier.