Running VScode on a compute node

Computing resources can be reserved and dedicated to run a Visual Studio server instance on our cluster. SLURM queuing engine will be used to provide access to available ressources directly from a VScode client.

Requirements

In summary, follow these steps:

  • Edit the extensions settings (Ctrl+Shift+P – Remote-SSH Settings):
  • Specify a SSH config file to store connection configurations (e.g. ~/.ssh/vscode-config)

  • Raise “Connect Timeout” to e.g. 300 seconds since the job scheduler may take some time to get the remote shell running

  • Enable “Enable Remote Command”

  • Enable “Use Local Server”

  • Enable “Enable Dynamic Forwarding”

 

and if desired, configure your SSH parameters to allow SSH-key access without password to our main server cluster.iric.ca.

Configuration

Edit the SSH config file specified above, typically in ~/.ssh/vscode-config, and add or customize definitions based on your computing requirements. For example:

Host cluster-vscode
HostName cluster.iric.ca
User gendrop
RemoteCommand /soft/bioinfo/vscode/vscode-shell-proxy.py -g bioinfo –salloc-arg=–cpus-per-task=2 –salloc-arg=–time=8:00:00 –salloc-arg=–mem-per-cpu 16g

Host cluster-vscode-gpu
HostName cluster.iric.ca
User gendrop
RemoteCommand /soft/bioinfo/vscode/vscode-shell-proxy.py -g bioinfo –salloc-arg=–cpus-per-task=4 –salloc-arg=–time=1:00:00 –salloc-arg=–gres=gpu:1 –salloc-arg=–mem-per-cpu=16g

Make sure to modify the user and SLURM group account to fit your Linux account.

Once saved, use the standard method to connect to a remote SSH server (Ctrl+Shift+P – Remote-SSH : Connect to Host).