Using AWS EC2 to build deep learning application

Posted on Feb 7, 2017

This blog is to demonstrate how to setup Deep learning environment on AWS with GPU support.

To use a pre-build environment, just follow these steps. If you want to setup environment yourself from scratch, you can refer to another article.

  • Start an Amazon AWS account.
  • Start a EC2 instance.
  • Play with deep learning using jupyter notebook


To start up an AWS account,just follow the online guide


Amazon offers an EC2 instance that give you access to GPU support. Remember this instance is not free and charge 0.70 per hour. But you can build a spot instance to reduce your cost. About how to build a spot instance, you can refer Markus Beissinger' blog

So let's start an instance. First, choose your region as N.California ,because my AMI is stored on this region. Then you can Launch instances.When you are in AWS console. Fisrt,choose community AMIs tab and search for "fae6b49a" AMI.


Its name is DataScienceLab. I hava installed cuda,cudnn,anaconda,tensorflow,keras,theano,torch(pytorch),mxnet,caffe,lasgne in this environment with GPU support. So you can choose your favoriate tool later.

In the next page, choose g2.2xlarge Type. Then click next. When you are on step6, you need to add some type like this.
Through adding these rules, you can using jupyter notebook on the website.

Then,click review and launch.
If you launch instance on AWS first time, the system will ask you create a new key pair. You can also choose an existing key pair if you have build an instance before.

Once your instance is running, you can access it through SSH.

ssh -i EC2KeyPair.pem [email protected]<your instance ip address>


So far, you have start a remote virtual machine on AWS. If all goes well ,you will see windows like this. To ensure the environment properties, you need to run these two command first.
source ~/.bashrc ## import the environment variables
conda info -e # check the virtual environments

As you see, this environment includes all famous deep learning framework. To choose your favorite framework, just run:
$ source activate <environment name>

Every environment has ipython installed. However it is still tough writing script in command model. To enable the jupyter notebook ,you need to run:
$ jupyter notebook

If there is no error, you can access the notebook server at ,the pin is "datasci"


Remember to include https:// in your address,or it doesn't work.


Congratulations! You have done with the environment. You can play with deep learning with your chosen framework.

Next ,I will write another article to show how to set up this environment from scratch.



About Author

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp