2015.12.02
Part 1/2: Selecting CUDA and Linux Distro by version
Following our article on selecting CUDA and a supported linux distro, we will write about our install of CUDA 7.5 on Ubuntu 15.04 which are by the time of this ariting the most updated version of the SDK and OS. Once again, those post are more about taking note on our trial than a real “state of the art” tutorial about properly installing the CUDA development toolchain.
To follow this step-by-step guide we are supposing you already have a running G2 AMI instance. Please refer to our part 1 for AMI selection.
Note: Windows user. Use PUTTY to SSH into your instance. Past its public IP to the Host text-field then go to Category/Connection/SSH/Auth on the left panel to browse and load you private Key (use PUTTY Keygen utility to convert the downloaded .pem file into a .ppk file)
Linux users will ssh into their instances using:
ssh -i
Before starting any CUDA related install you may want to update and upgrade the OS. Note that you can directly install CUDA first if you want.
1 Update the Kernel then download & install the build-essential dependency
Driver updates included in the package linux-image-generic are required.
The build-essential package will install the compiler toolchain & utilities (make, g++).
sudo apt-get install linux-image-generic build-essential
2 Download and Install CUDA.
The required repository can be found in this URL to check its version/revision number:
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/cuda-repo-ubuntu1504_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1504_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install -y cuda
3 Setup the environment.
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
You will certainly want to have this setup running by default so using pico or the CLI add the two lines above to the ~/.bashrc file. You will need to logout then re-login to take this change effective.
4 Check the install by running a device query.
We will install the samples in the home folder to run the deviceQuery code:
cuda-install-samples-7.5.sh ~/
cd NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery
make
./deviceQuery
Here is our output. We can see the GRID K250 device ready with its info as well as the test Result = PASS.