Skip to content

Instantly share code, notes, and snippets.

@iver56
Last active November 7, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iver56/5c5c0e16a6f504e207c7 to your computer and use it in GitHub Desktop.
Save iver56/5c5c0e16a6f504e207c7 to your computer and use it in GitHub Desktop.
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