GCE DeepLearning Images As A Backend For Google Colaboratory
Starting latest release of our images they can be used as a Colab backend. If you have not used Colab before:
Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. See our FAQ for more info.
With our images one can use Colab with any time of the hardware and any Deep Learning framework. Let me show how simple it is to start using Colab with 1 Volat GPU and PyTorch.
Create Required Instance
This can be done with a simple command:
Wait till after instance is up and Nvidia driver installation is finished. I’m serious you need to wait. Yes if you see “ERROR: (gcloud.compute.ssh) [/usr/local/bin/ssh] exited with return code [255].” this also means you need to wait more! How much more? Approximately 5 minutes.
SSH to The Instance
ssh-ing to the instance with port mapping:
If you do not have gssh command (as usual all my gcloud commands are here):
Open your browser at localhost:8080 . Just once to confirm that Jupyter Lab is working correctly and also to get cookie form the Jupyter to be propagated to the browser (this is required for the Colab to communicate with Jupyter).
Attache Colab to the backend
Now, open Colab: https://colab.research.google.com/notebooks/welcome.ipynb
Create new notebook.
Press “connect ” and “Connect to local runtime…”:

Now just press connect (since we already have backend running on the port 8080):

Test It!
That is it, you have Colab that works with PyTorch and Volta GPU:

And do not forget to delete instance after:
If you do not have ginstance_delete command: