Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Warning |
---|
The native interactive mode mechanism of the job scheduler does not work. Do NOT try commands like ‘qrsh’, ‘qlogin’. |
VS Code
Info |
---|
A GitHub account is required for authentication to access the established Remote Tunnels. |
Note |
---|
While VS Code supports normal Microsoft account can also be used, 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:
Code Block |
---|
#!/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.
Code Block |
---|
$ 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. Open the vscode on the local computer, and follow these steps.
X11 VNC
Info |
---|
This process essentially uses SSH tunneling. If you're unfamiliar with SSH tunneling, this resource may be helpful: https://blog.mobatek.net/post/ssh-tunnels-and-port-forwarding/ |
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:
Code Block |
---|
#!/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:
Code Block |
---|
$ cat 295_x11_vnc.out Loading vnc - x11vnc-nvidia ******** SSH TUNNEL INFO ******** You must setup SSH tunneling on your local computer for connecting. For Windows: https://blog.mobatek.net/post/ssh-tunnels-and-port-forwarding/ For Linux or macOS, sample ssh below: ssh -L PORT:wp-delta-f03.cse.unsw.edu.au:PORT login.cse.unsw.edu.au PORT for web browser: provided by the HTTP URL below >>OR<< PORT for VNC client: 59xx (see VNC viewer below) Running: apptainer run -B /import/reed/8/z3155686 -B /scratch_local/295.1.all.q /share/apps/sif/x11vnc/12.6.1-cudnn-devel-ubuntu22.04-x11vnc.sif *** Running /sbin/setuser ubuntu $DOCKER_CMD... Open your web browser with URL: http://localhost:6080/vnc.html?resize=downscale&autoconnect=1&password=wxaZpA1o or connect your VNC viewer to localhost:5900 with password wxaZpA1o |
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:
Info |
---|
The compilation will not fully completed but there are enough CUDA binaries can be used for testing. |
Code Block |
---|
# switch to the temporary job scratch space on the compute node's local NVMe/SSD storage. cd /scratch_local/295.1.all.q git clone https://github.com/NVIDIA/cuda-samples.git cd cuda-samples make |
Table of Contents | ||
---|---|---|
|