Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install CUDA 7.0 on Amazon EC2 g2.2xlarge running Ubuntu 14.04 trusty
sudo apt-get update
sudo apt-get -y dist-upgrade
# /boot/grub/menu.lst keep the local version. (or maybe not? replacing it could maybe be a good idea, and could avoid some of the hassle below)
sudo apt-get install -y gcc g++ gfortran build-essential git wget linux-image-generic libopenblas-dev python-dev python-pip python-nose python-numpy python-scipy linux-headers-generic-lts-trusty linux-source
# sudo apt-get install linux-headers-`uname -r`
sudo rm /boot/grub/menu.lst
sudo update-grub
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run
# because / has only around 8 GB, move it to /mnt which has lots of space
mv ~/cuda_7.0.28_linux.run /mnt
sudo sh /mnt/cuda_7.0.28_linux.run
# accept eula, answer yes to every question and use default directories
echo 'export PATH=/usr/local/cuda-7.0/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
sudo reboot
# verify/test cuda
nvidia-smi
# check output
cd NVIDIA\_CUDA-7.0\_Samples/1\_Utilities/deviceQuery
make
./deviceQuery
# check output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.