Scripts to install TensorFlow on an AWS EC2 GPU Instance
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Scripts to install TensorFlow on an AWS EC2 GPU Instance

These scripts are based on the excellent guide by @ramhiser available here

The first part takes about 10 mins and the second part takes about 30 mins to finish

Note about cuDNN

This script requires an Nvidia Accelerated Computing Developer Program account. If you do not have an account already, register for an account at: Once accepted (typically takes about a day), download cuDNN from: Host this file on a private location and provide the URL when the script runs.

Note about versions

This script is for the following specific versions:

Name Version
TensorFlow 0.9.0
CUDA 7.0
cuDNN 7.0
Java 8
Bazel 0.2.3
Python 2.7.6


  • Request an AWS EC2 (spot) instance with the following settings:
    • AMI: Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-fce3c696
    • Type: g2.2xlarge
    • Storage: 16 GB (or higher)
  • SSH into the instance
  • Download part 0 of 3 of the script
    • wget
  • Set executable
    • chmod +x
  • Execute script part 0 of 2
    • ./
  • Execute script part 1 of 2
    • ./
  • Enter URL to download cuDNN from
  • Reboot machine
    • sudo reboot
  • SSH back into machine
  • Execute script part 2 of 2
    • ./
  • Test TensorFlow
    • $ python
    • >>> import tensorflow as tf