Hands-On Machine Learning on Google Cloud Platform
上QQ阅读APP看书,第一时间看更新

Troubleshooting

There is an alternative solution if you encounter problems in accessing your Notebook. The idea is to launch the Jupyter Notebook with IP 0.0.0.0, without having to set up a static IP first:

jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser

This will generate a token. Do SSH into another terminal, adding the following flags --ssh-flag="-L" --ssh-flag="2222:localhost:8888":

$ gcloud compute ssh sparrow --ssh-flag="-L" --ssh-flag="2222:localhost:8888"

This is how it associates the URL localhost:2222 with the Jupyter Notebook URL localhost:8888. You can then access your Notebook at http://localhost:2222. You also need to enter the token you were given a moment ago.

This alternative was given by the comments on this blog post by Jeff Delaney, Running a Python Jupyter Notebook on Google Cloud Enginehttps://jeffdelaney.me/blog/running-jupyter-notebook-google-cloud-platform/.