Il est possible de faire une session interactive sur un noeud GPU sur Kairos, à certaines conditions :
- la durée de connexion ne peut pas excéder 8 heures
- La réservation est sur la file "shared-gpu", et par conséquent limitée à 1 GPU, 72 CPUs et 212 Go de RAM
- Pour un travail plus intensif, il vaut mieux préférer le lancement par sbatch qui permet de réserver des ressources adaptées
Comment demander une session interactive sur les noeuds GPU
Lorsque vous êtes connecté sur une frontale de kairos, exécutez le script :
runGHSession.sh
Laissez le script démarrer (cela prend quelques secondes, soyez patient...), puis vous devriez voir un affichage de ce style :
Starting session gh ...
#===========================================================================
|
| You are in a tmux terminal on GPU node : kairosgh0
|
| For more information about Grace Hopper interactive sessions :
| http://www.calmip.univ-toulouse.fr/node/1693
|
+---------------------------------------------------------------------------
| Quick Tmux Guide (Prefix = ) :
|
| Ctrl+b + c Create a new window
| Ctrl+b + n / p Next / Previous window
| Ctrl+b + " / % Split Vertical / Horizontal
| Ctrl+b + [arrows] Move inside splitted windows (up /down / left/ right)
| Ctrl+b + pageup Enter history (arrows to scroll, ctrl-c to exit)
|
| For more shortcuts : http://www.calmip.univ-toulouse.fr/node/1693
|
#===========================================================================
|
| ⚠️ Please exit this terminal (Ctrl+D) as soon as you have finished
|
#===========================================================================
|
| Note for Apptainer users :
|
| Before any apptainer pull command, please set proxy env with :
| export http_proxy=socks5h://localhost:26507
| export https_proxy=socks5h://localhost:26507
|
| To unset as it may disable network other tools like curl or wget :
| unset http_proxy
| unset https_proxy
|
#===========================================================================
Lorsque vous avez ce message, vous êtes sur un noeud GPU et vous pouvez l'utiliser en interactif.
⚠️ Merci de fermer votre terminal (Ctrl-D) lorsque vous avez terminé. Cela permet de libérer les ressources pour les autres utilisateurs
Demander plus de mémoire, plus de processeurs ou plus de temps
Pour ajuster la quantité de mémoire allouée (30 Go par défaut), le nombre de cœurs utilisés (10 cœurs par défaut) ou la durée de la session (4H par défaut), vous pouvez utiliser les options suivantes avec la commande runVisuSession.sh :
--mem XM (max 212500M) ⚠️ Option non disponible pour le moment
--cpus-per-task Z (max 72 cœurs) ⚠️ Option non disponible pour le moment
--time HH:MM:SS (max 8 Heures)
--help (Affiche l’aide)
Utiliser Apptainer
Pour utiliser la commande "apptainer pull" dans une session interactive, il faut positionner le proxy afin que le conteneur puisse avoir accès à internet avec les commandes suivantes :
export http_proxy=socks5h://localhost:$(getProxyPort.sh)
export https_proxy=socks5h://localhost:$(getProxyPort.sh)
⚠️ Si vous avez des commandes curl ou wget, ce paramétrage peut impliquer de devoir ajuster vos commandes :
wget -e use_proxy=yes -e socks_proxy=socks5://localhost:$(getProxyPort.sh) URL
curl -x socks5h://localhost:$(getProxyPort.sh)
Pour désactiver le proxy :
unset http_proxy
unset https_proxy
Commandes tmux
Voici une aide sur les commandes du terminal tmux des sessions interactives :
Start and Exit | | | Attach and Switch | ||
|---|---|---|---|---|
| tmux | Start a new session | | | tmux attach | Attach to the most recent session from the shell |
| tmux new -s work | Start session named work | | | tmux attach -t work | Attach to session work from the shell |
| tmux ls | List sessions | | | Ctrl+b s | Choose a session from the session list |
| tmux kill-session -t work | Kill session work | | | Ctrl+b ( | Switch to the previous session |
| tmux kill-server | Stop tmux server | | | Ctrl+b ) | Switch to the next session |
| exit | Exit current shell (pane) | | | Ctrl+b d | Detach from the current session |
Windows | | | Copy Mode / Terminal history | ||
|---|---|---|---|---|
| Ctrl+b c | Create new window | | | Ctrl+b ⇞ | Enter terminal history |
| Ctrl+b , | Rename current window | | | ↑/↓ | Navigate into terminal history |
| Ctrl+b & | Kill current window | | | q or Ctrl-C | Exit terminal history |
| Ctrl+b n | Next window | | | ||
| Ctrl+b p | Previous window | | | ||
| Ctrl+b 0-9 | Switch to window by number | | | ||
Panes | | | Pane Navigation | ||
|---|---|---|---|---|
| Ctrl+b % | Split pane vertically | | | Ctrl+b ←/→/↑/↓ | Move between panes |
| Ctrl+b " | Split pane horizontally | | | Ctrl+b Ctrl+←/→/↑/↓ | Resize the current pane |
| Ctrl+b x | Kill current pane | | | Ctrl+b Alt+1 | Select the even-horizontal layout |
| Ctrl+b o | Cycle panes | | | Ctrl+b Alt+2 | Select the even-vertical layout |
| Ctrl+b q | Show pane numbers | | | Ctrl+b Alt+5 | Select the tiled layout |
| Ctrl+b ; | Toggle last active pane | | | ||
| Ctrl+b z | Zoom/unzoom pane | | | ||
Pour plus d'information sur tmux : https://github.com/tmux/tmux/wiki/Getting-Started