Getting started with with GPU's AWS

In order to get started training deep learning models you will need to have access to a GPU. If you have a desktop this may not be an issue, however, if you are on a laptop you most likely do not have a GPU. Specifically the gpu needs to be an Nvidia GPU with CUDA installed. At this time this is the only GPU compatitable for deep learning.

GPU's have come a long way in the last few years due to a rise of the computer gaming industry. GPU's specialize in parallel processing. Parallel processing is important when you are playing Call of Duty and throw a grenade and it blows up and all the shrapnel physics needs to be calculated at once so the game know's where each piece of shrapnel is going to land. In deep learning thousands of samples are thrown into a set of equations and the equations need to create constants that can differentiate the samples with their desired out comes. More on that later.

If you need access to a GPU, the most common way to access the gpu is through the cloud. Amazon Web Services is the most popular option and relatively inexpensive. If you don't already, go ahead and get an AWS account set up. Once you are logged into AWS follow the instructions for setting up an AWS server below:

Launch EC2 instance:

Responsive image

Select AWS Marketplace and type "Deeplearning AMI". Here you have a choice. If you are a beginner select the Deep Learning AMI (Ubuntu). If you have experience downloading python packages and want to create a custom environment select Deep Learning Base AMI, which only has the lower level CUDA and cudnn installed:

Simple Option: Responsive image

More customizable option: Responsive image

Select p2.xlarge:

Responsive image

If you want you can modify the storage.
Click Launch. This will prompt to select an existing key pair or create a new key pair.
Select new key pair.
Create Key pair .pem file name:

Responsive image

Click download key pair.
Key pair will be downloaded. Move the key pair into a folder in which you will access the AWS server.
Launch instance.
Go to the EC2 instances page:

Responsive image

Select the instance that you just created that is now running and click connect. This will prompt directions to connect.
Pull up a terminal and go to the directory in which you saved the .pem file to.
Type chmod 400 [nameofyourpemfile].pem. This will make the .pem file not publically viewable.
Go to the example in the window and copy and paste the ssh snippet into the terminal:

Responsive image

Back to Top