Enable CUDA GPU working under VM [duplicate]
Solution 1:
VirtualBox will not expose the host GPU directly to a guest unless you use PCI passthrough. You could try that, but it is still experimental and might not work.
It would be much easier to use the Linux host directly instead of trying to do this in a VM. If you really need a container for some reason, then try LXC (see the answer to Using GPU from a docker container).