Amazon has released a Deep Learning AMI and makes the process of running deep learning on GPU way easier than before. Before the availability of this AMI, I had to go through the painstaking process of installing all the required CUDA and cuDNN libraries and then spending lots of time in debugging just to get everything running. This AMI makes the on-boarding process much much easier and smoother. Great works indeed !
Follow the steps in the following blog to launch the instance.
https://aws.amazon.com/blogs/machine-learning/get-started-with-deep-learning-using-the-aws-deep-learning-ami/
Go to AWS Marketplace, search for deep learning AMI (ubuntu) and create an instance from the image
Select the p3.2xlarge instance type. Make sure you check the hourly pricing for selected instance. It adds up quickly for GPU instance. For p3.2xlarge instance, it costs ~ $3.06/hour. See this EC2 pricing link.
Note: Remember to terminate your instance after use.
Review and Launch your instance
SSH to your new instance
ssh -L localhost:8888:localhost:8888 -i ~/.ssh/my-key-pair.pem ubuntu@xx.xxx.xxx.xxx
Activate TensorFlow + Keras 2 on Python 3 with CUDA 8 using the following command
source activate tensorflow_p36
Run some examples
cd ~/tutorials/TensorFlow/board
python mnist_with_summaries.py
Start tensorboard using the following command. You can then access the tensorboard UI at http://your-aws-instance-public-ip:6006
tensorboard --logdir=/tmp/tensorflow/mnist
Try out other examples
git clone https://github.com/keras-team/keras.git
cd keras/examples
python cifar10_cnn.py