Edit and run Jupyter Notebooks from Google Cloud Platform on Visual Studio Code

Viewed 406

I have a Dataproc cluster running on GCP with Jupyter component installed, which get it's notebooks stored to the cluster's temporary bucket on GCS and are edited directly through Dataproc's Jupyter web interface.

Is there a way to use VSCode to edit and run (using jupyter extension) the notebooks on my machine directly from GCS so i can still use my cluster's computational resources and online data living in GCP?

1 Answers

You can use synchronise the content of local directory on your machine to a Google cloud storage bucket or its child folder using gsutil rsync command. So when you change your file locally in VSCode it will be uploaded / changed under your bucket .

More details on how to use gsutil rsync here

An example of a command:

gsutil rsync path/to/vscode-project/notebooks gs://yourbucket/notebooks

Related