Skip to content

Working with EC2 instances

Oleguer edited this page Aug 24, 2018 · 3 revisions

Steps:

  1. Go to our aws console: https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances

[Terminal 1] (executing code)

  1. Select one of the servers: p2.xlarge (1 GPU), p2.8xlarge (8 GPUs), p2.8xlarge (16 GPUs)

Actions -> Instance State -> Start
(wait until status checks (2/2))

IMPORTANT: Remember to (Actions -> Instance State -> Stop) when you are done!!!

  1. Open terminal and enter:

ssh -i ~/ssh_keys/shapes_aws_key2.pem ubuntu@<Public DNS>

Where <Public DNS> is in the Description tab of the server

  1. In server terminal: Activate keras:

source activate tensorflow_p27

  1. Check the branch and git pull latest commit

[Terminal 2] (open jupyter to edit files)

  1. Open new terminal and:

ssh -i ~/ssh_keys/shapes_aws_key2.pem -L 8000:localhost:9500 ubuntu@<Public DNS>

  1. Start jupyter:

cd silhouettes jupyter notebook --no-browser --port=9500

  1. Copy link provided, paste it to your web browser and change 9500 for 80000 and go.