Executing RAPIDS from your computer (without a local GPU)

Setting the stage

Have you ever found yourself desperately needing more GPU power to run your deep learning models, but your local configuration simply can’t carry out? If so, then this article will show you how to use cloud GPUs as if they were part of your personal machine.

Setting up the EC2 Instance

Amazon Elastic Compute Cloud (EC2) provides scalable computing capacity in the AWS cloud. It allows the users to rent instances (virtual machines) in it. Different types of instances exist, and the ones that have a GPU included are:

  • Amazon EC2 P3 Instances, with up to 8 NVIDIA Tesla V100 GPUs.
  • Amazon EC2 G3 Instances, with up to 4 NVIDIA Tesla M60 GPUs.
  • Amazon EC2 G4 Instances, with up to 4 NVIDIA T4 GPUs.
  • Amazon EC2 P4 Instances, with up to 8 NVIDIA Tesla A100 GPUs.
Figure 1 Selecting the AMI for the instance
Figure 2 Selecting an appropriate instance type
Figure 3 Instructions to SSH into your instance

Installing RAPIDS

The AMI that we selected comes with the Conda package and environment management system preinstalled on it, so we can use it to create an environment with installed RAPIDS. To do so, just run the following command once connected to your virtual machine:

Setting PyCharm to use remote interpreter

The Professional version offers a compelling feature that allows you to configure a remote Python interpreter locally using SSH connection.

Conclusion

This article illustrates the rather straightforward approach to setting up a GPU powered virtual server on AWS, and makes use of the GPU power locally in one of the most popular Python IDEs-PyCharm. It is a simple but useful and powerful solution for all the folks out there who want to make the most of the GPU power but don’t own the physical hardware needed. With this technique you get the feel of running the code locally, when in actuality the remote interpreter is running code remotely on the cloud.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Loka

Loka

35 Followers

Loka is a team of elite data engineers & designers who help ship fascinating innovations. Our stories give you a peek into what’s now & next for ML & humanity.