Most of us are not privileged enough to have a GPU powered machine to train our Deep Neural networks on. And this is where cloud hosted Virtual Machine (VM) gets into picture. Recently I came across an article that reflected on lack of resources for guiding beginners to access GPU powered Google cloud services. So my sole purpose in this blog is to demonstrate setting up a GPU powered VM on Google cloud platform & not training a model on top of it.
There couldn’t have been a better day for drafting this post, as today Google has announced 36% price reduction on using NVIDIA’s Tesla GPUs. Before we proceed, it is intrinsic to note that we shall be billed on per-second basis for this deployment. In U.S. regions, generally available Tesla K80 GPUs will cost $0.45 per hour while using the newer and more powerful beta Tesla P100 machines will cost $1.46 per hour.
I will constantly keep adding screenshots for people who are not familiar with Google Cloud platform (GCP). The very first time we create our account in GCP, it allocates a credit of $300.00 for free trial and is valid for an year. Please be careful with your choices in the portal because the moment the meter goes beyond the free trial, your credit/debit card will start getting billed.
Another associated good news is that Google has also reduced the price for preemptible local SSDs by almost 40 percent. Enough of background & introduction, so now let us get started to feel the thrill. Our very first step would be to create a VM and your console should look like:
Once we click on ‘Create’, console will populate multiple hardware & networking parameters for our instance to choose from. This completely depends upon our requirement and will amount to our billing invoice so please do not get carried away while selecting hardware options. Please do remember to keep your CPU platform as Intel Haswell or later. Following screenshots showcase the options (can be extended) available:
Once the instance is ready, Internal and External IP Addresses shall be displayed for your use. Apart from your VM Console, these IP Addresses shall also be available in ‘Networking’ tab, like:
And, we have a GPU powered Virtual Machine up and running. But since we are just experimenting with GPU-enabled machines, we shall set the scale tier to
BASIC_GPU with a single NVIDIA Tesla K80 GPU. Our next step is to train our model that can be done using Cloud Machine Learning Engine. In case too many beginners still face issue in training a model on top of this VM, then please do keep me posted in Comments section and I will add that segment as well to this blog. Till then, enjoy machine learning!