APT Documentation: AWS GPU Back End

The information below will guide you through understanding, setting up, and configuring Amazon Web Services Elastic Cloud Compute (AWS EC2) for use with APT. After you are done with the setup, APT will be able to perform deep learning training and inference in the cloud.


Contents


Requirements

The steps below will walk you through obtaining the following:

About EC2 instances

You can think of an EC2 instance (as configured below) as a computer with a GPU in the cloud that is under your control. It is your "GPU in the cloud". An instance has:

Since STOPPED instances are inexpensive, APT is currently designed around the idea that you will create an EC2 instance and "leave it up" for a stretch of time (eg weeks, maybe even a month or two) while you do a bunch of work for a project. During this time, you can iteratively label, train, and track within APT over multiple sessions. Between active working sessions, your instance is STOPPED, and all APT state including trained models and movies/trxfiles to be tracked is preserved. After a time, you will reach a stopping point for the project, and you can instruct APT to download your trained models to your local workstation. (Tracking results are currently downloaded immediately after each tracking session.) When the download is complete, you can terminate the EC2 instance.

APT automates starting/stopping your instance (TODO: check), starting/stopping training and tracking processes, and so on. However, it is inevitable that APT will at times become disconnected from what is happening in the cloud. At these times, manually managing the EC2 instance by eg ssh-ing into the instance and killing processes, or manually stopping an instance via the AWS dashboard will be necessary. More information on how to do this is here.

Be proactive and check on your instance!


EC2 Setup

AWS account setup

Connect your computer to your account


Connecting APT to AWS

To set APT to use the AWS backend for training and tracking:


Managing EC2

From the EC2 console, you can Start, Monitor, and Manipulate instances.

Launching an APT-compatible instance

To launch an instance:

Monitoring EC2 instances

To see information about all your EC2 instances, go to the EC2 console and use the Instances option, and select any launched instance from the table.

You can connect to a RUNNING instance using ssh. Find the instance's IP address (IPv4 Public IP). Use the IP address to ssh into the machine using

    ssh -i ~/.ssh/[key_pair.pem] ubuntu@[IPaddress]
  
Replace [key_pair.pem] with the ssh key pair you created and downloaded previously. If instead you imported an existing key into Amazon, you can replace this with your private key file. Here is a screenshot of sshing to an EC2 instance on Windows:

Manipulating EC2 instances

Use the Actions button at the top of the instances page, to Terminate the machine from the Instance State menu.