How to install Cuda in a Vagrant box, for optimus enabled laptops? : <p>I have performed a pci pass through on the vagrant config, enabled 3D acceleration. Installed Cuda, and tried to run the deviceQuery Cuda example, but unfortunately it tells me it can't pick up a device.</p>

<pre><code>./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 38
-&gt; no CUDA-capable device is detected
Result = FAIL
</code></pre>

<p>The card is a GF 740M, the driver is nvidia-352, I am using Ubuntu 14.04 in the Vagrant box. In vagrant:</p>

<p>lspci shows:</p>

<pre><code>$ lspci -nn | grep '\[030[02]\]'
00:02.0 VGA compatible controller [0300]: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter [80ee:beef]
01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 740M] [10de:0fdf] (rev a1)
</code></pre>

<p>bumblebeed:</p>

<pre><code>$ bumblebeed
[  137.087712] [ERROR]No integrated video card found, quitting.
</code></pre>

<p>What could I be doing wrong? I can't believe how difficult it is to get nvidia drivers/cards working in a virtualization environment.</p>
