Running VScode and the python extension is great for development. I get clean python files and can run my code interactively. It is the same setup we have at work and I then remotely connect to a server with more cpu and GPU. However, for my side gigs I havent really figured out a workflow, until now.

This morning I found colab-ssh. It enables you to remotely connect your google colab instance to your local VScode! And if you have a GPU runtime on google colab you get that as well, of course. Combining this with a small google drive mounting, and I get more or less my local working environment but with GPU acceleration.

A quick step-by-step (see colab-ssh for updates if this doesnt work):

1. Open a new google colab notebook.
from google.colab import drive
drive.mount('/root/gdrive')

3. Go to this site and get an ngrok token.
# Install colab_ssh on google colab
ngrokToken = 'XXX'
from colab_ssh import launch_ssh, init_git

1. You’ll now see something like this:
Collecting colab_ssh
Installing collected packages: colab-ssh
Successfully installed colab-ssh-0.2.63
Successfully running 2.tcp.ngrok.io:13254
[Optional] You can also connect with VSCode SSH Remote extension using this configuration: