...
First, open a terminal, login to the cluster and request an interactive session on one of the compute nodes.
Remember the name of the compute node that was assigned to you, e.g.
n2cn1234
.Keep the terminal open until you’re done with your work.
Second, use VS Code’s remote extension to connect to the compute node via SSH.
For this to work, you need to be able to directly
ssh n2cn1234
to the compute node. To avoid many entires in your~/.ssh/config
(one for each compute node) you can use the following entries for Noctua 1 and 2 based on wildcards (the jump hosts are defined here):Code Block # Noctua 2 Host n2cn* n2lcn* n2gpu* n2fpga* HostName %h ProxyJump n2-jumphost User [USERNAME] IdentityFile [PATH TO PRIVATE KEY] IdentitiesOnly yes # Noctua 1 Host cn-* gpu-* HostName %h ProxyJump noctua-jumphost User [USERNAME] IdentityFile [PATH TO PRIVATE KEY] IdentitiesOnly yes
Web-based alternative: code-server
The idea is to run a server on a (compute) node and access it (via port forwarding) in your local webbrowser. Steps:
Log in to the node you want to run your computations on (e.g. a node that you’ve allocated via SLURM).
Load the code-server module:
module load tools code-server
Start the server with
PASSWORD=<YOURPASSWORD> code-server --bind-addr 0.0.0.0:<PORT> --auth password
, where<YOURPASSWORD>
is a password of your liking and<PORT>
is a port number above 1024 (e.g.8081
).Open a local terminal to establish port forwarding:
ssh -L <PORT>:<NODENAME>:<PORT> <YOURACCOUNT>@noctua2
.Finally, open http://127.0.0.1:8081/ to see the VS Code interface, running on the node, in your local browser.