# VSCode Extension to run ARE session

**URL:** <https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263>\
**Category:** Technical\
**Created:** [12 December 2022 03:45 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263 "2022-12-12T03:45:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [12 December 2022 03:45 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/1 "2022-12-12T03:45:51Z")

</div>

Hello everyone.

Since many NCI users have VSCode as their main text editor, I thought it would be useful having a VSCode extension to start and connect to an ARE session.

This to have a better workflow rather than having to start an ARE session separately, get the ssh config parameters and then connect through VSCode (using the remote-ssh extension).

At the moment, I don’t think there is any extension that allows such direct connection, but I was wondering if anyone had already set up such a thing ( Maybe @Scott?).

Would love to know more and in case work on that if other people are interested in having such a workflow.

Cheers  
Davide

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [12 December 2022 04:05 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/2 "2022-12-12T04:05:13Z")

</div>

There’s no api for starting a session, so you’d need to scrape the web interface to do that or work out what the web interface submits to the pbs queue.

If a session is already running you can get the connection info from the ~/ondemand directory. [https://git.nci.org.au/saw562/tools/-/blob/master/ood](https://git.nci.org.au/saw562/tools/-/blob/master/ood) sketches out how this can be done. I’ve been putting this together mainly for easier vnc access but `./ood ssh` should ssh into the most recent session

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [12 December 2022 05:19 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/3 "2022-12-12T05:19:09Z")

</div>

At the moment I’m already getting infos through the ~/ondemand directory, and everything works.

I was mainly looking for a more “straightforward” way to run the session directly from gadi (by submitting a PBS job) and, ultimately, to do this using a VSCode API.

Do you know where can I get more information on what the web interface submits to the pbs queue to start an ARE session?

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [12 December 2022 05:34 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/4 "2022-12-12T05:34:18Z")

</div>

`qstat -f` on a running ARE job should show everything used to start the queue jobs, I don’t know how ondemand works internally though

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [12 December 2022 06:03 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/5 "2022-12-12T06:03:54Z")

</div>

Not what you wanted, but related, some OOD services provide VS Code in a browser

[https://www.emsl.pnnl.gov/MSC/UserGuide/ood/vscode.html](https://www.emsl.pnnl.gov/MSC/UserGuide/ood/vscode.html)

[https://hpc.nmsu.edu/discovery/ondemand/vscode/](https://hpc.nmsu.edu/discovery/ondemand/vscode/)

It appears this is one of OODs supported apps

[https://osc.github.io/ood-documentation/latest/install-ihpc-apps.html](https://osc.github.io/ood-documentation/latest/install-ihpc-apps.html)

and this is the app they are running:

> **[GitHub - coder/code-server: VS Code in the browser](https://github.com/coder/code-server)**
>
> VS Code in the browser. Contribute to coder/code-server development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)\
**Post date:** [12 December 2022 06:46 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/6 "2022-12-12T06:46:17Z")

</div>

Nice. I’d imagine a VS Code service would be appreciated by a broad range of NCI users. Perhaps worth dropping a question to NCI Help @atteggiani?

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [12 December 2022 22:57 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/7 "2022-12-12T22:57:38Z")

</div>

@Aidan I had read about the possibility to have OOD services in VSCode browser. I have never used VSCode browser so maybe I’ll check it out.  
However, I think most people would still prefer using their local VSCode so I’m gonna look more into this and maybe follow @dougiesquire’s suggestion and contact NCI directly.  
I’ll keep you posted.

---

<div class="post-metadata">

**Author:** ![cbull](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/cbull/32/2203_2.png) [@cbull](https://forum.access-hive.org.au/u/cbull)\
**Post date:** [28 July 2025 23:25 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/8 "2025-07-28T23:25:17Z")

</div>

Just wondering if you ever got this to work @atteggiani? My use case, mostly, is that it would be nice to use VSCode to edit notebooks on an ARE session.

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [29 July 2025 01:57 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/9 "2025-07-29T01:57:50Z")

</div>

Hi @cbull,

I didn’t follow it through with NCI.  
Even though is a bit “clunky”, you can still connect to an ARE session via VSCode by using the [Remote - SSH](https://code.visualstudio.com/docs/remote/ssh) VSCode extension.

The other information needed is the hostname of the computing node you are connected to through ARE.

In general, I would suggest the following workflow to make things a bit simpler and quicker:

### 1. Install the `Remote - SSH` VSCode extension

You can do this manually, or from a local terminal you can run:

```sj
code --install-extension ms-vscode-remote.remote-ssh

```

**This step only needs to be carried out once.**

### 2. Add SSH configuration for compute node hosts

Add the following (by changing `<your-gadi-username>` with your _Gadi_ username) to your `~/.ssh/config` file (before the `Host *` if present):

```ssh
Match exec "echo %n | grep -q '^gadi-cpu-'"
    ProxyJump <your-gadi-username>@gadi.nci.org.au
    User <your-gadi-username>
    ForwardX11 true
    ForwardX11Trusted yes

```

This will enable to connect to a compute node (hostname always in the form `gadi-cpu-...`) via SSH (by automatically using a proxyjump).  
**This step only needs to be carried out once.**

### 3. Start an ARE session

Start an [ARE](https://are.nci.org.au/pun/sys/dashboard) session (VDI or Jupyterlab).  
Once the session starts, your ARE Dashboard will tell you the name of your compute node Host:

 ![Screenshot 2025-07-29 at 11.19.28 am](https://us1.discourse-cdn.com/flex020/uploads/access1/original/2X/e/ecf29648a78d866a59b055da93fe2a06c0ce7daf.png)  
Copy the compute node Host (for simplicity, you can click on it and then in the new tab copy the last portion of the URL).

### 4. Use the compute node Host as the hostname for VSCode remote - SSH

You can paste the compute host manually in VSCode’s `Remote - SSH: Connect to Host....` command, when asked “Select configured SSH host or enter user@host”.

Alternatively, you can run the following command on a local terminal:

```sh
code --file-uri vscode-remote://ssh-remote+<compute-node-host>

```

For the example in the image above, the command to run would be:

```sh
code --file-uri vscode-remote://ssh-remote+gadi-cpu-bdw-0031.gadi.nci.org.au

```

This opens a new “blank” VSCode session connected to the compute node.

## Extra

### 1 ex. Connect to a specific folder (automatically creating a workspace)

You can also connect to a specific folder on _Gadi_ and automatically create a VSCode workspace using the `--folder-uri` option in the command above:

```sh
code --folder-uri vscode-remote://ssh-remote+<compute-node-host><path/to/folder/on/gadi>

```

For example, with the comput host of the image above, to connect to the `/scratch/public` folder, run:

```sh
code --folder-uri vscode-remote://ssh-remote+gadi-cpu-bdw-0031.gadi.nci.org.au/scratch/public

```

### 2 ex. Automate the connection with a script/alias

You can also write a bash function or alias (in your local `~/.bashrc`), to automate the connection.  
For example, if you want to connect to ARE though VSCode using `arecode <compute-node-host>`, you can add the following to your local `~/.bashrc` file:

```auto
alias arecode="code --file-uri vscode-remote://ssh-remote+${1}"

```

Then (in a new bash session, or after sourcing the `~/.bashrc`), to connect to the ARE session of the example image above, you could run:

```sh
arecode gadi-cpu-bdw-0031.gadi.nci.org.au

```

Hope this helps simplify workflows!  
Davide

---

<div class="post-metadata">

**Author:** ![taimoorsohail](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/taimoorsohail/32/201_2.png) [@taimoorsohail](https://forum.access-hive.org.au/u/taimoorsohail)\
**Post date:** [2 June 2026 07:20 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/10 "2026-06-02T07:20:34Z")

</div>

> [@atteggiani](#):
>
> ```auto
> Match exec "echo %n | grep -q '^gadi-cpu-'"
> ProxyJump <your-gadi-username>@gadi.nci.org.au
> User <your-gadi-username>
> ForwardX11 true
> ForwardX11Trusted yes
> 
> ```

I am guessing we also need to add an entry for `Match exec "echo %n | grep -q '^gadi-gpu-'" for ARE runs with the GPU node? `

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [2 June 2026 22:44 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/11 "2026-06-02T22:44:34Z")

</div>

We’ve had success using the VScode CLI and remote tunnel extension to run from compute nodes.

From an ARE session (jupyter or VDI should work, you need ARE for the external internet access) get the vscode x64 CLI from [Download Visual Studio Code - Free AI Code Editor for Mac, Linux, Windows](https://code.visualstudio.com/download)

Log in using your Github account in jupyter/VDI terminal with

```bash
code tunnel user login

```

then start vscode with

```bash
code tunnel

```

You can then use the [remote tunnels](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-server) extension to connect from Vscode desktop (use the same github account you logged in with) or `code tunnel` also gives you a URL you can connect to in a web browser.

If you load an environment before running `code tunnel` vscode should be running in that environment. If you start ARE on a gpu node you’ll have access to the gpus in vscode for ML development.

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [6 July 2026 00:20 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/12 "2026-07-06T00:20:24Z")

</div>

Hi @atteggiani ! I was wondering if this is the current recommended way of using vscode with an ARE sessions?

Following these steps, I have been able to open the session. However (a) it doesn’t have internet access and (b) I can’t open the conda environments.

Maybe I’m missing something extra?

---

<div class="post-metadata">

**Author:** ![paocorrales](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/paocorrales/32/3326_2.png) [@paocorrales](https://forum.access-hive.org.au/u/paocorrales)\
**Post date:** [6 July 2026 00:27 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/13 "2026-07-06T00:27:49Z")

</div>

If you connect to an ARE session using VScode you won’t have an internet connection. It’s annoying but I don’t see NCI changing that soon.

To find the conda/analysis3 environments, I use these instructions (assuming you added the corresponding modules in the session advanced settings):

1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac) and type “Python: Select Interpreter”.
2. You will see a list of available interpreters, including those from your conda environments. Most probably the `analysis3` won’t be on the list so you will need to add it manually by typing the path to the interpreter in the command palette. So, select “Enter interpreter path…” and copy the path. The path to the `analysis3` conda environment will be `/g/data/xp65/public/apps/med_conda_scripts/analysis3-XX.XX.d/bin` but replace XX.XX with the corresponding version of the environment you want to use. For example, 25.06.
3. This will now be available in the jupyter kernel.

It works for me, but I know others had problems with ARE now seeing the jupyter kernel.

---

<div class="post-metadata">

**Author:** ![JuliaN](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@JuliaN](https://forum.access-hive.org.au/u/JuliaN)\
**Post date:** [6 July 2026 01:09 UTC](https://forum.access-hive.org.au/t/vscode-extension-to-run-are-session/263/14 "2026-07-06T01:09:10Z")

</div>

Great, thank you Paola! I seem to be able now to find the environment jaja! Maybe I just had a typo before..
