This brief post will talk about how to quickly set up a VM for deep learning on Google Cloud. Google Cloud makes things like driver installation trivial, so this whole process should take maybe 5 minutes.
Go to Google Cloud Console. If this is your first time, you may have some setup to do, but more importantly, you will also get $300 in free credits to use! Set that up, and then in the sidebar, go to Compute Engine – VM instances. We’ll now make a new instance. Click on Create Instance, and select Marketplace on the left. This should open a popup with a search bar, where we’ll search for “deep learning”. Pick “Deep Learning VM” by “Google Click to Deploy”, and then click Launch. The name of your VM doesn’t really matter, but the zone is a little important. Pick a zone that has a GPU that you want to use. You’ll see an estimate of the monthly cost on the right. For our purposes, the defaults are fine–us-west1-b, an n1-highmem-2 machine with a T4 GPU. Scroll down, and then select “Install NVIDIA GPU driver automatically on first startup?” This will make your life a lot easier. Click on Deploy.
That’s really it! It will now set up the VM, the disks, and everything necessary to start working on a deep learning project. You can view your VM at Compute Engine – VM instances from the sidebar. You’ll want the gcloud CLI tool to interact with the VM easily. Install that on your local machine, run
gcloud init, and follow the instructions.
IMPORTANT: Your VM, disks, and all resources are billed by the second (if I recall correctly). When you’re done using the VM, TURN IT OFF! Otherwise, you will incur charges. More importantly, if you’re done using the VM forever, delete it. Turned off VMs still incur charges for things like storage usage.