yhzhao / W207KaggleFaceFeature

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

**ATTN W207 Team**
Please document your experiments on this Google Slide:
https://docs.google.com/presentation/d/1aUJzsK7-zuDKUWCuxM-9D-nIF46IqHfjPlWh1ODZmZk/edit?usp=sharing

# Set up AWS EC2 instance using these steps:
https://www.kaggle.com/c/facial-keypoints-detection/details/deep-learning-tutorial

# set up GPU cluster on AWS using:
#http://markus.com/install-theano-on-aws/

# OR just use the AMI
ami-b141a2f5

# hint, when sshing in, log in as "ubuntu", instead of "root":
# ex) ssh -v -i "BTA_CNN2.pem" ubuntu@ec2-54-67-81-238.us-west-1.compute.amazonaws.com

ssh -i "BTA_CNN3.pem" ubuntu@ec2-52-53-195-223.us-west-1.compute.amazonaws.com



# once you are in the enviorment, install emacs:
sudo apt-get update
sudo apt-get install emacs24

# test the GPU by following these instructions:
http://deeplearning.net/software/theano/tutorial/using_gpu.html
# should output: Used the gpu

# clone in Github:
git clone https://github.com/yhzhao/W207KaggleFaceFeature.git

# run setup_part1.sh
chmod +x /home/ubuntu/W207KaggleFaceFeature/setup_part1.sh
./setup_part1.sh

# the EC2 instance will reboot
# connect again, and run setup_part2.sh
chmod +x /home/ubuntu/W207KaggleFaceFeature/setup_part2.sh
./setup_part2.sh

# sometimes you have to enable permission
sudo chown -R $USER /usr/local/lib/python2.7
sudo chown -R $USER /home/ubuntu


# get iPython notebook, follow the link below:
# http://blog.impiyush.me/2015/02/running-ipython-notebook-server-on-aws.html

wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.4.1-Linux-x86_64.sh

bash Anaconda2-2.4.1-Linux-x86_64.sh
which python
source .bashrc

ipython
# Out[2]: 'sha1:xyz'
# pw: XYZ
# sha1:xyz

exit
jupyter notebook --generate-config

mkdir certs
cd certs
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

cd ~
mkdir Notebooks
cd Notebooks

# ssh -i "BTA_CNN3.pem" ubuntu@ec2-52-53-195-223.us-west-1.compute.amazonaws.com
# launch Jupyter server:
jupyter notebook
# https://ec2-54-67-81-238.us-west-1.compute.amazonaws.com:8888/

### When starting EC2 again 
# authorized_keys  under .ssh/ folder
/Users/tangbyron/.ssh/known_hosts
emacs /Users/tangbyron/.ssh/known_hosts

to download things from EC2
scp -i "BTA_CNN3.pem" ubuntu@ec2-52-53-195-223.us-west-1.compute.amazonaws.com:/path/to/file 

About


Languages

Language:Jupyter Notebook 99.8%Language:Python 0.2%Language:Shell 0.0%