sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export CUDA_HOME=/usr/local/cuda-6.5
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64
PATH=${CUDA_HOME}/bin:${PATH}
export PATH
cuda-install-samples-6.5.sh ~/Samples/
cd ~/Samples/NVIDIA_CUDA-6.5_Samples
make
sudo apt-get install nvidia-prime
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
sudo pip install Theano