Amazon EC2 with PyTorch
Instructions to setup a deep learning enviornment with pytorch.
Deep Learning AMI - https://aws.amazon.com/marketplace/pp/B01M0AXXQB
Setup a KeyPair if not already. Can name is anything. This will be used in the ssh command. Create an instance
To test start with micro instance. The g2 and p2 have GPU's, and should choose if want to run with GPU (note the hourly rates)
Go to Security Groups Section on the EC2 console and Add Custom TCP Rule add port 8888
ssh to server using your pem file and the public host name from ec2 console
ssh -i Navacron.pem firstname.lastname@example.org (replace with your own pem, and hostname)
On the terminal type the following
git clone https://github.com/navacron/deeplearning.git
./deeplearning/ec2/install.sh #this will update the vm, install pytorch, setup ipython notebook on port 8888, default password is deeplearning
The jupyter server can be run manually
nohup ./deeplearning/ec2/jupyterserver.sh &
In chrome https://email@example.com:8888, ignore the secruity warning (since it is a self signed ssl cert). Type in deeplearning as password. If you want to change password, get a new hash and update $HOME/.jupyter/jupyter_notebook_config.py c.NotebookApp.password property using the output from below.
from notebook.auth import passwd passwd()