VSCode¶
Tip
Windows users are recommended to use Git Bash
for the following instructions to work.
The instructions below should let users run their VSCode session on a compute node.
Pre-requisite installations:
- A recent version of vscode.
- Extension
Remote - SSH
from https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh.
Step 1. On your local machine, create ssh keys (existing ssh keys can also be used - no need to create new ones)
Follow the prompts on the terminal to generate ssh-key pair, and note the directory where keys are being saved.
Step 2. Send the public key to Rāpoi
The path ~/path/to/public/key
should be the same as displayed when generating the ssh-key ~/.ssh/id_rsa.pub
in some cases.
Step 3. Test the new keys
Step 4. On your local machine, update ssh config
file
Create ~/.ssh/config
file if it does not exist. Add hostname details to it:
Host VSCode_Compute
User <YOUR_RAAPOI_USERNAME>
HostName amd01n01
ProxyJump raapoi_login
Host raapoi_login
HostName raapoi.vuw.ac.nz
User <YOUR_RAAPOI_USERNAME>
Host *
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
IdentityFile ~/.ssh/id_rsa # Add your own private key path here
AddKeysToAgent yes
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Step 5. On your local machine, open a terminal window and login to Rāpoi normally
Once logged in alloc resources for the VSCode session
Tip
Extend the time to maximum 5 hours with -t0-04:59:59
Step 6. Connect VSCode session
Open VSCode window, and click on the bottom left corner that says Open a Remote Window
, and then choose Connect to Host
and then selecting VSCode_Compute
as a host.
Once a connection is established, your VSCode session should be running on a compute node now.
Tip
To speed up VSCode, there are steps mentioned in the official VSCode docs. Below is just a part of it:
Once connected, update VSCode's /nfs/home/$USER/.vscode-server/data/Machine/settings.json
, and add the following lines to it:
Step 7. To close VSCode session.
Go to File
> Close Remote Connection