Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 4.24 KB

cloud_readme.md

File metadata and controls

91 lines (62 loc) · 4.24 KB

AWS Setup Instructions

For performance testing, you will need to run this assignment on a VM instance on Amazon Web Services (AWS). We'll be providing (or have already sent) you student coupons that you can use for billing purposes. Here are the steps for how to get setup for running on AWS.

Note

Please don't forget to SHUT DOWN your instances when you're done for the day to avoid burning through credits overnight!

Creating a VM

  1. Log in to the AWS EC2 dashboard. On the top right of the page, make sure you are on the us-east-2 region.

Switch region

  1. Now you're ready to create a VM instance. Click on the button that says Launch instance.

Launch instance

  1. Click on Browse more AMIs AMI.

Search AMI

  1. Search for cs149_neuron_v2 in My AMIs and make sure to click on Shared with me. Click Select.

Select AMI

  1. Choose the trn1.2xlarge instance type.

Choose instance type

  1. Change the size of the volume to 150 GB to accomodate the packages we will need to install to make the instance functional for the assignment:

Storage

  1. You will need a key pair to access your instance. In Key pair (login) section, click Create a new key pair and give it whatever name you'd like. This will download a keyfile to your computer called <key_name>.pem which you will use to login to the VM instance you are about to create. Finally, you can launch your instance.

Key Pair Step 1 Key Pair Step 2

  1. Confirm all details and launch instance

Confirm

  1. Now that you've created your VM, you should be able to SSH into it. You need the public IPv4 DNS name to SSH into it, which you can find by navigating to your instance's page and then clicking the Connect button, followed by selecting the SSH tab (note, it may take a moment for the instance to startup and be assigned an IP address):

Connect

Make sure you follow the instructions to change the permissions of your key file by running chmod 400 path/to/key_name.pem. Once you have the IP address, you can login to the instance. We are going to be using neuron-profile in this assignment, which uses InfluxDB to store profiler metrics. As a result, you will need to forward ports 3001 (the default neuron-profile HTTP server port) and 8086 (the default InfluxDB port) in order to view neuron-profile statistics in your browser. You can login to the instance while also forwarding the needed ports by running this command:

ssh -i path/to/key_name.pem ubuntu@<public_dns_name> -L 3001:localhost:3001 -L 8086:localhost:8086

Note

Make sure you login as the user "ubuntu" rather than the user "root".

Warning

If you need to step away during setup after creating your instance, be sure to shut it down. Leaving it running could deplete your credits, and you may incur additional costs.

Fetching your code from AWS

We recommend that you create a private git repository and develop your assignment in there. It reduces the risk of losing your code and helps you keep track of old versions.

Alternatively, you can also use scp command like following in your local machine to fetch code from a remote machine.

scp -i <path-to-your-pem-file> ubuntu@<instance-IP-addr>:/path/to/file /path/to/local_file

Shutting down VM

When you're done using the VM, you can shut it down by clicking "stop computer" in the web page, or using the command below in the terminal.

sudo shutdown -h now