Working with Jupyter notebooks on gadi/ARE via VS Code

Is this possible? Can we have listed here the steps needed to do that?

1 Like

Hi @navidcy,

It is possible to connect to an ARE session via VSCode (and then use any VSCode extension, for example Jupyter and Python extension to work with .ipynb files similarly to what you would do in a jupyterlab session).

To do so you will have to install the “Remote - SSH” extension (or the whole “Remote Development” pack). To install the remote-ssh extension from your command line you can type code --install-extension ms-vscode-remote.remote-ssh.
A complete guide on how to install, set up, and use the extension can be found here.

My suggestion, is to add a section in your ~/.ssh/config file that looks like this:

Host are
       ProxyJump <your-gadi-username>@gadi.nci.org.au
       User <your-gadi-username>
       ForwardX11 true
       ForwardX11Trusted yes
       Hostname <cpu-node-hostname>

You can get the <cpu-node-hostname> from the ARE sessions once you connect. It shows up within the Host field as shown in the snapshot below, and it is usually in the format “gadi-cpu-bdw-00X”.

Once you change your hostname in the “are” section of your ~/.ssh/config file (thing that you have to do every time you connect to a different ARE session), you can connect to “are” using VSCode’s “Remote-SSH Connect to Host” command from the Command Palette (F1 or ⇧⌘P).

For a helpful guide on how to use jupyter notbook with VSCode’s Python and Jupyter extensions you can check this youtube video → Jupyter Notebooks in VS Code Extension NEW in 2022 - Tutorial Introducing Kernels, Markdown, & Cells - YouTube

Cheers
Davide

4 Likes

cc @ashjbarnes