Get deep-learnin’ on Google Cloud Platform the easy way

2 minute read

Create a Deep Learning VM on GCP in 2 minutes

Dearest reader,

I ask you these questions:

  • Do you want to quickly start training your deep neural networks in the cloud?
  • Want to learn some cloud computing but don’t know where to begin?
  • Can’t afford to buy a GPU but can afford to rent one?

If you answered “Yes!” to any of them, then do read on, my friends. Google Cloud Platform (GCP) will make your lives a little bit easier!

(Note: I love setting up my VMs in some detail. Funnily enough, I find the steps described herein to be wholely unsatisfying!)

The recipe

I’ll assume that you’re logged into your GCP accounts.

In your menu, go to:

AI Platform -> Notebooks

This will take you to Notebook Instances:

Click on NEW INSTANCE and select an image you want to use. Being a Google fanboy, I choose the latest TensorFlow image available.

Some of these images are built for deep learning. If you want to use GPUs to train your networks, choose With 1 NVIDIA Telsa K80.

Yes, yes, yes. I hear you. I also asked myself the same question:

“What do I do if I want to use 8x NVIDIA Tesla V100s running on a VM with 96 vCPUs?”

If you’re willing to pay for these, you’ll be able to get them by clicking on CUSTOMIZE. If you instead accept the defaults, don’t you worry. This process will create a fully-fledged Compute Engine VM that you’ll be able to easily modify later.

Before we move on, tick Install NVIDIA GPU driver automatically for me. This takes care of our GPU setup!

Now smash that CREATE button.

Wait a little bit…

Once you see a green tick, click on OPEN JUPYTERLAB.

Voila! You’re now ready to ‘learn deeply’ with a GPU in the cloud! That’s all there is to it, my friends.

What if I want to further customise my VM?

This is also easy to accomplish!

Click on Compute Engine in the main menu. You’ll see your beautiful VM there.

Stop your VM to start editing it. Make all your usual wonderful changes like these:

  • Add firewall rules so that you can run TensorBoard on another port
  • Add extra disks
  • Increase the number of vCPUs, only to reduce their number later because you went mad with all the processing power at your fingertips
  • Doing the same with your RAM
  • Doing the same with your GPUs

That’s it! Do remember to shut down your VMs when you’re not using them, folks.

Until next time,

Justin