(Optional) Using VS Code with Jupyter
You can use VS Code with Jupyter Notebooks.
Because of the way CML uses
the internal networking and port forwarding of Kubernetes, when VS Code launches a Jupyter
Server it binds to the wrong address and access is blocked. You therefore have to launch
your own Jupyter Server and tell VS code to connect to that.
The first setting you need to set is the Python > Data Science: Jupyter Server URI
setting. Set this to
Then you need to open a terminal to launch a Jupiter Notebook server.
You can launch it using:
/usr/local/bin/jupyter-notebook —no-browser —ip=127.0.0.1 —NotebookApp.token=[some-token] —NotebookApp.allow_remote_access=True.This creates a Jupyter server that any new Notebooks you launch will run in.
- The first setting you need to set is the Python > Data Science: Jupyter Server URI setting. Set this to
After you install the Jupyter Notebooks, you can use it inside VS Code.
Another feature that you can use with VS Code is running a temporary Notebook for
executing random code snippets. Select code you want to run, right click and click
Run Current File in Python Interactive Window.
This is less robust though and will create many Untitled*.ipynb files in your home directory.