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!
- Log in to the AWS EC2 dashboard. On the top right of the page, make sure you are on the
us-east-2
region.
- Now you're ready to create a VM instance. Click on the button that says
Launch instance
.
- Click on
Browse more AMIs
AMI.
- Search for
cs149_neuron_v2
inMy AMIs
and make sure to click onShared with me
. ClickSelect
.
- Choose the
trn1.2xlarge
instance type.
- 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:
- You will need a key pair to access your instance. In
Key pair (login)
section, clickCreate 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.
- Confirm all details and launch instance
- 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):
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.
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
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