Skip to content

Instantly share code, notes, and snippets.

@valentina-s
Created October 10, 2016 01:53
Show Gist options
  • Save valentina-s/79d2443425a921ebfc5e3379ed1ea52a to your computer and use it in GitHub Desktop.
Save valentina-s/79d2443425a921ebfc5e3379ed1ea52a to your computer and use it in GitHub Desktop.
Jupyter Notebook on Google Cloud Compute Instance

On Instance:

pip install jupyter[notebook]

jupyter notebook --generate-config

# nano .jupyter/jupyter_notebook_config.py

echo "c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8088" >> .jupyter/jupyter_notebook_config.py

On local computer:

gcloud compute ssh --ssh-flag="-L 8088:localhost:8088"  --zone "us-central1-f" "instance-10"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment