Development GPUs: Difference between revisions

From Wiki
(Created page with "AImageLab provides development GPUs that can be used via remote debugging. Hosts containing development GPUs replicate the same configuration of all aimagelab-srv nodes. ==Access to development GPUs== All AImageLab-SRV users can access the development GPUs. The development resources are managed by SLURM, within the partitions <code>dev</code>and <code>students-dev</code>, respectively dedicated to the research staff (students, doctoral students, research fellows, collab...")
 
Line 2: Line 2:


==Access to development GPUs==
==Access to development GPUs==
All AImageLab-SRV users can access the development GPUs. The development resources are managed by SLURM, within the partitions <code>dev</code>and <code>students-dev</code>, respectively dedicated to the research staff (students, doctoral students, research fellows, collaborators) and students (thesis and non-thesis students).
All AImageLab-SRV users can access the development GPUs. The development resources are managed by SLURM, within the partition <code>all_serial</code>.
 
===Limits===
Research staff: Up to 4 development GPUs can be requested at the same time. Each development session lasts a maximum of 4 hours.
 
Students: Up to 3 development GPUs can be requested at the same time. Each development session lasts a maximum of 2 hours.


===Use from shell===
===Use from shell===
⚠️ '''Warning''' : It is forbidden to access GPUs on development nodes without going through the SLURM scheduler.
⚠️ '''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:
To get a shell with a development GPU, use the following command from the login node or a development node:


'''Research staff''': <code>srun --partition=dev --gres=gpu:1 --pty bash</code>
<code>srun --partition=all_serial --gres=gpu:1 --pty bash</code>
 
'''Students:''' <code>srun --partition=students-dev --gres=gpu:1 --pty bash</code>


===Use from IDEs===
===Use from IDEs===
Line 23: Line 16:


*From the tab <code>Extensions</code>, install extensions <code>Remote - SSH</code>and<code>Remote - SSH: Editing Configuration Files</code>
*From the tab <code>Extensions</code>, install extensions <code>Remote - SSH</code>and<code>Remote - SSH: Editing Configuration Files</code>
*Connect to <code>aimagelab-srv-00.ing.unimore.it</code>(e.g.: <code>F1</code>, <code>Remote-SSH: Connect to Host...</code>) and enter your project folder (e.g. via: <code>F1</code>, <code>File: Open Folder...</code>)
*Connect to <code>ailb-login-02.ing.unimore.it</code>(e.g.: <code>F1</code>, <code>Remote-SSH: Connect to Host...</code>) and enter your project folder (e.g. via: <code>F1</code>, <code>File: Open Folder...</code>)
*From the tab <code>Extensions</code>, on the remote host install the extensions <code>Python</code>and<code>Pylance</code>
*From the tab <code>Extensions</code>, on the remote host install the extensions <code>Python</code>and<code>Pylance</code>
*Create the file <code>$projectFolder/bash.sh</code>, where <code>$projectFolder</code>the project folder indicates, containing: Research staff: <code>srun -Q --immediate=10 --partition=dev --gres=gpu:1 --time 60:00 --pty bash</code> Students:<code>srun -Q --immediate=10 --partition=students-dev --gres=gpu:1 --time 60:00 --pty bash</code>
*Create the file <code>$projectFolder/bash.sh</code>, where <code>$projectFolder</code>the project folder indicates, containing: <code>srun -Q --immediate=10 --partition=all_serial --gres=gpu:1 --time 60:00 --pty bash</code>  
*Check that the file <code>$projectFolder/bash.sh</code>has all execute permissions. Otherwise run<code>chmod +x $projectFolder/bash.sh</code>
*Check that the file <code>$projectFolder/bash.sh</code>has all execute permissions. Otherwise run<code>chmod +x $projectFolder/bash.sh</code>



Revision as of 18:38, 31 December 2023

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

Access to development GPUs

All AImageLab-SRV users can access the development GPUs. The development resources are managed by SLURM, within the partition all_serial.

Use 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 --gres=gpu:1 --pty bash

Use from IDEs

Visual Studio Code

  • From the tab Extensions, install extensions Remote - SSHandRemote - SSH: Editing Configuration Files
  • Connect to ailb-login-02.ing.unimore.it(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 PythonandPylance
  • Create the file $projectFolder/bash.sh, where $projectFolderthe project folder indicates, containing: srun -Q --immediate=10 --partition=all_serial --gres=gpu:1 --time 60:00 --pty bash
  • Check that the file $projectFolder/bash.shhas all execute permissions. Otherwise runchmod +x $projectFolder/bash.sh
  • Open (or create if non-existent) the file $projectFolder/.vscode/settings.json, and make sure it contains the following key-value pair

"terminal.integrated.automationProfile.linux": { "path": "$projectFolder/bash.sh" }