AImageLab SRV

Table of Contents

Remote debugging via Desktop IDE


AImageLab provides development GPUs that can be used via remote debugging. Hosts containing development GPUs replicate the same configuration of all aimagelab-srv nodes.

All AImageLab-SRV users can access the development GPUs. The development resources are managed by SLURM, within the partition all_serial. To access them, you always need to specify one account. To get the list of accounts assigned to your username, run the susage command.

Usage from shell

⚠️ Warning: It is forbidden to access GPUs and/or use heavy resources on login nodes without going through the SLURM scheduler.

To get a shell with a development GPU, use the following command from the login node or a development node:

srun --partition=all_serial --account=<account> --gres=gpu:1 --pty bash

Debugging via Desktop IDE

Visual Studio Code

  • From the tab Extensions, install extensions Remote - SSH and Remote - SSH: Editing Configuration Files
  • Connect to a frontend node (e.g.: F1, Remote-SSH: Connect to Host...) and enter your project folder (e.g. via: F1, File: Open Folder...)
  • From the tab Extensions, on the remote host install the extensions Python and Pylance
  • Create a file bash.sh in the root of your project, containing the following:
    srun -Q --immediate=10 -w=<host> --partition=all_serial --account=<account> --gres=gpu:1 --time 60:00 --pty bash
    where host is the frontend node to which you are connected.
  • Check that the file has execute permissions. Otherwise run chmod u+x bash.sh
  • Open (or create) .vscode/settings.json from your project root, and make sure it contains the following key-value pair:
    "terminal.integrated.automationProfile.linux": { "path": "$projectFolder/bash.sh" }
  • Restart VSCode, connect again to the same frontend node, open your project.
  • You can now start debugging!

Last updated: August 13, 2024