In this blog post I will discuss how to get TensorFlow working on the AWS p2 instances, along with some tips about configurations and optimizations. I will assume you are familiar with the basics of AWS, and focus on how to set up TensorFlow with GPU support on AWS.

Launch GPU instance on AWS¶

We are going to be using a p2.xlarge instance, which comes with one Tesla K80 GPU. The setup should be the same for p2.8xlarge and p2.16xlarge which have more GPUs available. We will start with a base Amazon machine image (AMI) with Ubuntu 16.04 LTS. You can search for a suitable AMI with the EC2 Ubuntu Image Locator. I picked us-west-2 , 16.04 LTS , hvm:ebs-ssd , and found the AMI with an ID of ami-835b4efa

After launching the p2 instance, we can verify that we have the Tesla K80 on the system: