How to do it...

Once you have created an AWS account, follow these steps to launch an EC2 instance with an RStudio AMI:

  1. Sign in to the AWS console using your credentials. You will see the following screen:

  1. From the All Services tab, click on EC2. This will lead you to the following EC2 console page. Click on Launch Instance to launch an EC2 instance:

  1. You will be redirected to the following screen. Next, click on the AWS Marketplace option, as shown in the following screenshot, and type RStudio Server with Tensorflow-GPU for AWS in the search box:

  1. On selecting the RStudio Server with Tensorflow-GPU for AWS AMI, you will be prompted with the following pop-up window. Click Continue to proceed further:

  1. In the next step, you will be asked to choose an instance type. For training complex deep learning models, it is recommended to use an instance with a GPU. To do so, choose GPU Instances from the Filter by drop-down list and then select p2.xlarge from the list. Click on the Next: Configure Instance Details button to continue:

  1. In this step, you can configure the instance according to our requirements. In this case, we just go with the default options. Click on Next: Add Storage button to move to the next step:

  1. In the next step, you are allowed to change the storage options based on the size of your data. To continue to the next step, click on the Next: Add Tags button:

  1. In AWS, it is possible to assign metadata to the resources in the form of tags. You can add tags that consist of key-value pairs. Once done, click on the Next: Configure Security Group button to proceed further:

  1. In the following screen, you can configure the security options for your instance by adding rules. To proceed to the next step, click on the Review and Launch button:

  1. This will lead you to the following screen. In the Boot From General Purpose (SSD) popup, choose an option according to your requirements and click on Next:

This will lead you to the following screen. There will be certain warning messages that you need to address. Review your instance configuration and click on Launch:

If you have not created a key pair already, you are given an option to create one; otherwise, go with an existing one. Download the key pair and click on Launch Instances:

  1. Now you can return to your EC2 dashboard where you can see that you have one running instance, as shown in the following screenshot:

You can click on that for further details about your instance. You will be navigated to a similar screen, as shown in the following:

  1. You will be provided with an IP address and a port number to launch the AWS RStudio interface on a web page. For connecting to the interface, use rstudio-user as the username and your instance ID as the password. The following screenshot shows the AWS RStudio interface:

In the preceding screenshot, you can see that we have successfully executed the R script to classify handwritten digits.

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

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