Jump to content

"Cannot init CUDA" with Quadro P400 in LXC container (Debian)


bradford

Recommended Posts

bradford

My issue is similar to the issue posted here: https://emby.media/community/index.php?/topic/71464-cannot-init-cuda-with-quadro-rtx-4000-on-ubuntu-1804/

 

The difference is I'm running it in a LXC container passing /dev/nvidia* through, as well as being on Debian 9.6.

 

It's worked in the wild west days when I just had to use a ffmpeg build that supported nvenc - the link in my signature is my walkthrough of the process. 

 

To make sure the driver version isn't a culprit, I updated my driver on the host and in the container to 418.56 and nvidia-smi on both shows the card is detected with CUDA 10.1. Back in the day, nvidia-smi working was all it took to get ffmpeg and hardware transcoding working. 

 

hardware_detection.txt says "Cannot init CUDA", so I bet something about your CUDA detection isn't playing nice with container passthrough. I know this probably isn't supported, but I wonder if someone with insight into the hardware detection can give some insight (@softworkz?).

 

Thanks for your help

hardware_detection.txt

embyserver.txt

Link to comment
Share on other sites

bradford

@@Luke can you give any insight into what your detect_hardware code does? If the source is available I can look at it myself. Is it just looking at /dev/ nodes?  Or is it running a CUDA executable to test whether CUDA is available?

Link to comment
Share on other sites

@@Luke can you give any insight into what your detect_hardware code does? If the source is available I can look at it myself. Is it just looking at /dev/ nodes?  Or is it running a CUDA executable to test whether CUDA is available?

 

It is dynamically loading cuvid and nvenc libraries in the same way as ffmeg does.

Link to comment
Share on other sites

bradford

@@bradford - Are you saying that a recent 'official' ffmpeg build is working?

 

No, I haven't tried for a while. I'll see if I can get ffmpeg to work standalone and post back here with my results. 

Link to comment
Share on other sites

bradford

So in order to use CUDA the /dev/nvidia-uvm device needs to be present, and isn't unless it's explicitly passed through from the host. In order to have the host load the kernel modules at boot, I made a few changes like those listed in this guide: https://medium.com/@MARatsimbazafy/journey-to-deep-learning-nvidia-gpu-passthrough-to-lxc-container-97d0bc474957

 

Works great now, I'll update my guide as well. Hope this helps someone else in the same boat. Do you guys do something similar in your docker container?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...