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

Step1

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

Step2

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.

Paste_Image.png

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.
Paste_Image.png
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 ubuntu@<your instance ip address>

Step3

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.
bash
source ~/.bashrc ## import the environment variables
conda info -e # check the virtual environments

Paste_Image.png
As you see, this environment includes all famous deep learning framework. To choose your favorite framework, just run:
bash
$ 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:
bash
$ jupyter notebook

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

https://<your-instances-public-ip>:8888.

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

Paste_Image.png

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 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI