user678392
user678392

Reputation: 2031

Getting Docker to recognize nvidia graphics card on mac

When I am in my container, I run

 lspci | grep -i nvidia

and nothing shows.

When I run ./deviceQuery from the samples NVIDIA provides I get

 no CUDA-capable device is detected 

I know I have a nvidia driver on my mac. I just can't figure out how to get my docker container to realize that.

Upvotes: 4

Views: 3824

Answers (3)

Andy
Andy

Reputation: 38237

You'll first need to make the graphics card available in the Virtual Box VM. I'm not sure how to do that, but this looks like it might help:

https://www.virtualbox.org/manual/ch04.html#guestadd-video

Once you've got it mounted within the VM, then you can also share it with the container.

Upvotes: 1

Peter
Peter

Reputation: 2556

I haven't tried this myself, but this guy says that he can run native X11 Apps on a Mac using a beta docker client called Kinematic along with socat, XQuartz, and QGIS, and he seems to imply that NVidia driver issues were thus avoided. This looks worth a try!

Upvotes: 0

pvg
pvg

Reputation: 2729

On OS X, docker is a container running inside a separate virtualbox vm which does not expose the host GPU.

Upvotes: 4

Related Questions