Setting up a machine with GPU[s]in Google cloud — step by step instructions

Ajit Rajasekharan
7 min readJun 4, 2019

Logging my experience setting up a Google cloud machine with one or more GPUs (up to 8 possible now — 4 June 2019) for running machine learning models.

For creating an instance with multiple CPUs, skip this article entirely and go directly to this link. @aankul.a explains the steps very clearly in his article. This article is relevant for procuring GPUs.

The overall sequence of steps are

  1. Create Google cloud account if we don’t have one.
  2. Create a project.
  3. Create VM instance with the desired number of GPUs, OS, hard disk space, CPUs, CPU memory, etc.
  4. Install Nvidia drivers for the specific OS (link to drivers for different OS specified below). Confirm installation with a GPU test.

Steps 1–4 should take 25–45 minutes on average. Subsequent provisioning (steps 3–4) may be on average 15–20 minutes.

1. Google account creation

Follow the Google cloud account to create account/signup. There is a $300 free credit for 12 months. There is also an always free option for limited access. This FAQ has details. Note GPU/TPU is not included in the free option.

--

--