Deep learning on Amazon Web Services

Amazon Web Services (AWS) offers scalable, reliable, and easy to use on-demand cloud computing platforms and APIs on a pay-as-you-go basis. It is a comprehensive platform that provides access to numerous services such as computing, security services, analytics, database, storage, developer tools, and many other Infrastructures as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) offerings. With this wide range of services available to individuals, profit and non-profit enterprises, and educational institutions, AWS is considered one of the most successful cloud infrastructure companies, holding the majority of the market share. In this section, we will primarily work with EC2, which is a virtual computing environment. We will also use an Amazon Machine Image (AMI) for deep learning using R. AMI has software applications and libraries pre-installed on it.

In AWS, there are three options to rent a virtual machine:

  • On-demand instances: With this option, users can pay for the compute capacity by the hour or the second depending on the instances they run. There is the flexibility of increasing or decreasing the capacity depending on the demand for the application, and it is suitable for cases that do not require any long term commitment.
  • Spot instances: With this option, you can bid for the spare unused Amazon EC2 instances. The bid price fluctuates in real time based on demand and supply. Once your bid exceeds the current spot price and the capacity is available, your spot instances run. This option is recommended for applications that have flexible start and end times since, with this option, AWS can terminate your instance at any time.
  • Reserved instances: This option is almost around 50% cheaper than the on-demand pricing and provides capacity reservation when you commit to renting the machine for a certain amount of time.

You can use any of the preceding options to set up your deep learning instance on AWS based on your needs and convenience.

In this recipe, we will go through the steps of setting up a deep learning environment in AWS for training our models.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset