This write-up is for Laptops with ‘separate’ NVidia graphics cards, and makes use of the Bumblebee Nvidia installation.

For more typical desktop instructions, see the write-up here.

### Bumblebee RPMs

The basic RPM installation is as before, in the previous write-up.

### CUDA

The CUDA installation should be done from the Nvidia downloads site, as usual.

The end result should be the standard tree of folders :: /usr/local/cuda/{include,bin}.

### Source fixes

Now, as root, fix up Nvidia disallowing gcc greater than v4.9

In file /usr/local/cuda/include/host_config.h, look to make the following replacement :

Now, to set the right path for nvcc, in the user’s ~/.bash_profile add ::

#### Test the installation

Check that the kernel modules is there :

Looking good:

This works better than the previous desktop …

(and without the optirun) :

### Installation of libgpuarray

Install the bleeding edge libgpuarray into your virtualenv - first compile the .so and .a libraries, and put them in a sensible place :

This will likely complain about not finding clBLAS, which isn’t a problem here. Although, if you know you will require clBLAS in the future (and this is for advanced/experimental users only), see my OpenCL post, since you need to install this before running cmake above).

Next, install the Python component (after going into the same virtualenv) :

And then test it from within a regular user directory (using the same virtualenv) :

A good result is something along the lines of :

### Theano stuff

Store the following to a file gpu_check.py :

And then run, successively :

and

but