Installing and running SABL on Amazon EC2 with Nvidia GPU acceleration
1: | (Total of 20 steps) Make an account at aws.amazon.com |
2: | Navigate to the AWS Marketplace |
The link for this is: https://aws.amazon.com/marketplace Once there, search for: NVIDIA GPU | |
3: | Choose the AMI |
Use the AMI named: "Amazon Linux AMI with NVIDIA GRID GPU Driver" | |
4: | Choose Instance Type |
Use: "Family=GPU instances, Type=g2.2xlarge" | |
5: | Configure Instance Details |
Use the defaults | |
6: | Add storage |
Use the defaults | |
7: | Tag Instance |
This is optional - for this example we used: "Key=SABLRelease Value=2015a" | |
8: | Configure Security Group |
Use the defaults | |
9: | Review Instance Launch |
10: | Create a new key pair |
Make sure to download the .pem key (in this example it is named 'sabl_eu_lab.pem') and keep it securely! | |
11: | Launch the instance, then connect with SSH to it |
You will need to find the 'Public DNS name' for your instance using the Amazon Console. In this example it is: ec2-52-23-239-208.compute-1.amazonaws.com Execute the commands: $ chmod 600 sabl_eu_lab.pem $ ssh -v -Y -i sabl_eu_lab.pem ec2-user@ec2-52-23-239-208.compute-1.amazonaws.com | |
12: | Linux package installation |
These are required for a functioning mex compiler and for graphics rendering Install OpenGL: sudo yum install mesa-libGLU Install gcc: sudo yum groupinstall "Development Tools" | |
13: | Matlab licensing |
Before proceeding further...if you have not associated your university email address with the TAH license of your university, then you should first sort this out! | |
14: | Login to MathWorks to download Matlab |
Once there, download the installer for Matlab2015a (for 64-bit Linux) | |
15: | Unpack the Matlab zip file |
unzip matlab_R2015a_glnxa64.zip | |
16: | Run the Matlab graphical installer |
./install
Mathworks will check your university credentials at this step. For UTS users, check the information at: https://my.feit.uts.edu.au/pages/it_services/research_computing/software_support/matlab for registering your UTS email address with Mathworks as well as details of the Staff License Activation Key.
| |
17: | Download SABL 2015a .zip package |
Download from: Software Unpack it with: unzip SABL_toolbox-SABL2015A.zip | |
18: | Start Matlab |
./bin/matlab | |
19: | Navigate in Matlab |
Change the working directory to: 'SABL_toolbox-SABL2015A/utilities' | |
20: | Install SABL |
From the Matlab Command Window run:
>> u_install | |
Now navigate to an example project, e.g. SABL_toolbox-SABL2015a/projects/negative_binomial_example Then in p_monitor.m, uncomment the line:
E.gpu = true
Finally in the Matlab Command Window, run:
>> runexample |