GPU-gasm ❤❤
I know, high end deep learning GPU-enabled systems are hell expensive to build and not easily available unless you are a researcher at a top notch university, and I’m not fond of looking at epoch numbers go by on my terminal for days just to know my model was worthless.
Google Cloud is here to save us all, if you didn’t know already Google Cloud offers $300 worth of trial credit to try out any of their cloud services. This is exactly what I was looking for.
Fire up the Google Cloud website at cloud.google.com and signup for the trial with your Google account. You need a credit card for verification but you won’t be ever charged if you cancel before exhausting credits.
Console Home Page
Move on to the “Compute Engine” menu, it’ll take some time to fire up for the first time, then “Create Instance”. Damn, we missed a step. The catch is Google has some extra verification requirements to add a GPU to your machine, understandable, you wouldn’t want someone to use your GPUs for crypto mining.
Move over to IAM & admin -> Quotas, choose Compute Engine API in Service and NVIDIA GPU in Metrics, you can choose either of K80, P100 or V100. K80 serves me well. Check mark on a GPU quota of desired region (Quick tip: US servers will be cheapest), “Edit Quota”, fill in your details, enter the number of GPUs you require on the next page, don’t get greedy, higher the number you enter, tougher will be the approval.
The “Reason” section is the most important, briefly describe your purpose, in this case “Deep Learning Research”, make sure you show a non-commercial purpose. It’ll take 12–24 hours for approval, you’ll get an email.
Google may ask you to upgrade account before it allows to change quota, do that, you won’t be charged until you exhaust the $300 credit.
Quotas under IAM & admin
Create Instance Page
Once that is done, move over to “Create Instance” part, make sure you choose the same region as you chose earlier, select a machine type by clicking on “Customize”, I recommend 4 vCPUs with 30GB memory. Add the GPU you desire. Select a boot disk, I recommend “Ubuntu 16.04 with 200GB standard persistent disk”. Tweak your other requirements, and hit “Create”.
Few minutes later, your Deep Learning machine will be ready to train your models, oh, not quite yet.
Turns out they don’t come pre-installed with the NVIDIA CUDA drivers, such a shame. That part is little painful, maybe I’ll write another piece about that if you need it. Do that, install your favorite deep learning framework, Tensorflow, PyTorch etc. and you are good to go. SSH using the console option or if you prefer set up an SSH key to use your own terminal.
Suggestions or criticism always appreciated.
Cheers!
Saurabh is an undergraduate Computer Science major at National Institute of Technology, Warangal, India and currently a research intern at Indian Institute of Science, Bangalore.