AWS AI Blog

Get Started with Deep Learning Using the AWS Deep Learning AMI

Whether you’re new to deep learning or want to build advanced deep learning projects in the cloud, it’s easy to get started by using AWS.

The AWS Deep Learning AMIs, available in both Ubuntu and Amazon Linux versions, let you run deep learning applications in the cloud at any scale. The Amazon Machine Images (AMIs) come with pre-installed, open source deep learning frameworks including Apache MXNet, TensorFlow, the Microsoft Cognitive Toolkit (CNTK), Caffe, Caffe2, Theano, Torch, and Keras.

With the AMIs, you can train custom AI models, experiment with new algorithms, and learn new deep learning skills and techniques. There is no additional charge to use the AMIs—you pay only for the AWS resources needed to store and run your applications.

In addition, the AMIs offer GPU-acceleration through pre-configured CUDA and cuDNN drivers, as well as the Intel Math Kernel Library (MKL). The AMIs also come with popular Python packages and the Anaconda Platform.

The benefits for developers are clear—simplicity, ease of use, cost savings—and launching a compute instance is  simple. Follow this step-by-step walkthrough to get started with deep learning in minutes. 

Launching the AMI

Navigate to the AWS Management Console and sign in or create a new account.

 

Type EC2 in the search box or look under “All services”. Choose EC2 to open the EC2 console.

Choose the Launch Instance button and search for the AWS Deep Learning AMI in the AWS Marketplace. Here we’re picking the Ubuntu version, but you can also select Amazon Linux.

Select an instance type to launch and choose Next.

NOTE: If your P2 instance limit is 0, you need to request an instance limit increase through the AWS Support Center.

Choose Next on each page until you reach Configure Security Group. Under Source, choose My IP to allow access using only your IP address.

Review your instance, and choose Launch.

Select or create a new private key file, then launch your instance.

If your instance fails to launch because of your P2 instance limit, you need to request an increase.

 

Accessing your instance and launching Jupyter Notebook

Click View Instance and find your instance’s public DNS.

Open the terminal. Change to the directory where your .pem security key is located, then connect to your instance using SSH:

 

cd /Users/your_username/Downloads/	
ssh -L localhost:8888:localhost:8888 -i <your .pem file name> ubuntu@<Your instance DNS>


Open Jupyter using the command: jupyter notebook

Open a browser window and navigate to the URL indicated in the last step. Feel free to look through the src folder.

Choose New and start a new notebook. Import MXNet and start coding or try out a tutorial.

Now that you’ve launched the AWS Deep Learning AMI, you can easily run tutorials for computer vision, natural language processing, and recommender systems. Many MXNet tutorials are in Jupyter notebooks, making them very easy to launch and modify for your purposes. Here are a few suggestions to get you started. You can  find other suggestions on the MXNet site: