It is possible to connect to your Hosted Notebook from VS Code.
- Start a notebook server as instruced in Introduction to Valohai Hosted Notebooks.
- Once the server is up, you can find the server address and token in the Valohai logs.
- In VS Code, open a notebook you want to execute.
- Next, open the control palette (⌘+shift+P or ctr+shift+P) and search for
Specify Jupyter Server for Connections.
- Choose Existing
- Copy-paste the server address and token into the field and hit Enter.
- Leave the next field empty and just hit Enter again.
- Change the kernel for the notebook by clicking on the kernel name on the right upper corner of the notebook and then choosing the
(Remote) Jupyter Kernelfrom the list.
- You can check the connection by running the command
%pwdin one of the notebook cells. If the connection is as expected, this will return
Note that it is not currently possible to sync local files with a remote server due to how the VSCode jupyter extension works. Syncing local files with the remote notebook server is on the Iteration Plan for January 2023 for the jupyter extension team at Microsoft. We at Valohai will update this page when more information is available.