Interactive Job

The native interactive mode mechanism of the job scheduler does not work. Do NOT try commands like ‘qrsh’, ‘qlogin’.

VS Code

VS Code stores data in the user home directory, which is shared across the CSE infrastructure (VLAB, HPC, etc.). Therefore, ensure that you do not run multiple instances of VS Code in different locations simultaneously. If you are or have been running VS Code on VLAB or the login nodes, make sure to exit cleanly and stop all existing processes before proceeding.

While VS Code supports normal Microsoft account, UNSW SSO is NOT supported. To void confusion, here we cover GitHub only.

To establish a remote tunnel session on a compute node, submit the following job:

#!/bin/bash -l # PLEASE MAKE SURE YOU CHANGE THE FOLLOWING QSUB SETTINGS TO SUIT YOUR NEEDS # #$ -j y #$ -e $JOB_ID_$JOB_NAME.out #$ -o $JOB_ID_$JOB_NAME.out #$ -cwd #$ -N vscode-tunnel #$ -l mem=15G,jobfs=10G #$ -V # module load vscode/vscode-cli launch_tunnel

The vscode CLI prints out the instruction in the job’s output file, like below, simply follow the link to get authenticated.

$ cat 534_vscode-tunnel.out Loading vscode - vscode-cli spawn -ignore HUP /share/apps/noarch/vscode/vscode-cli/code tunnel * * Visual Studio Code Server * * By using the software, you agree to * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement). * ✔ How would you like to log in to Visual Studio Code? · GitHub Account To grant access to the server, please log into https://github.com/login/device and use code EFFF-CE86 Open this link in your browser https://vscode.dev/tunnel/wolfpack_zxxxxxx/import/xxxx/x/zxxxxxx/

Once the job prints out the URL, it is ready for connection. To connect, open the vscode on the local computer, open the Command Palette (F1) and run the command Remote Tunnels. Follow the prompts:

Screenshot 2024-09-25 150421.png
Screenshot 2024-09-25 150614.png

For more detailed information, please checkout the Official document: Remote Tunnels extension.

GitHub Issue

It has been observed that VS Code sometimes fails to establish a session after successful authentication against GitHub (the 'Open this link' message never appears). The cause of this issue is unclear. Possible solutions include:

  • Logging out of GitHub and logging in again

  • Unregistering all tunnels that VS Code has saved via Remote Explorer (that’s right, ALL of them)

Reset VS Code

In case thing is broken, please try full reset:

  • qdel the job which is running the VS Code

  • Delete any old processes on any other CSE systems (VLAB, lab computer etc)

  • Unregister the broken tunnel

  • Delete the corrupted user data: rm -rf ~/.vscode*

X11 VNC

A graphical interactive session can be obtained by running an x11vnc container. The session can be accessed via the web browser (or VNC client) on the user's local computer, with support for NVIDIA CUDA.

Please use the following submission script as a starting point:

#!/bin/bash -l # # PLEASE MAKE SURE YOU CHANGE THE FOLLOWING QSUB SETTINGS TO SUIT YOUR NEEDS # #$ -j y #$ -e $JOB_ID_$JOB_NAME.out #$ -o $JOB_ID_$JOB_NAME.out #$ -cwd #$ -N x11_vnc #$ -l mem=15G,jobfs=180G # adding more for GPGPU etc etc #$ -V #$ -P project_name module load vnc/x11vnc-nvidia # By default (if IMAGE_FILE_NAME is not provided), the newest cuda image is used. Other images are available at # /share/apps/sif/x11vnc/ # Just provide the image file name as the first argument ($1) start-vncserver [IMAGE_FILE_NAME]

Submit this script via qsub. The VNC connection information will be available in the job output log and will look like this:

Once SSH tunnel is setup correctly, the interactive session can be accessed via browser, looks like:

CUDA Samples

We can run CUDA Samples for verification purpose. Run the following INSIDE the interactive session: