oph:cluster:apptainer
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| Entrambe le parti precedenti la revisioneRevisione precedenteProssima revisione | Revisione precedente | ||
| oph:cluster:apptainer [2023/12/18 13:48] – [Graphical applications with ssh X forwarding] diego.zuccato@unibo.it | oph:cluster:apptainer [2024/11/28 09:25] (versione attuale) – Rimosse istruzioni troppo vecchie diego.zuccato@unibo.it | ||
|---|---|---|---|
| Linea 8: | Linea 8: | ||
| ===== Examples ===== | ===== Examples ===== | ||
| - | === Python Container === | + | <WRAP center round alert 60%> |
| - | By Amalie Louise Stokholm | + | Page is being worked |
| - | + | </WRAP> | |
| - | apptainer build --sandbox rockylinux8/ | + | |
| - | find rockylinux8 -type d -not -writable -exec chmod +w {} + | + | |
| - | apptainer run -f --writable rockylinux8/ | + | |
| - | apptainer run -f --writable rockylinux8/ | + | |
| - | mv .pyenv/ | + | |
| - | apptainer run rockylinux8/ | + | |
| - | .pyenv/ | + | |
| - | + | ||
| - | === Graphical applications with ssh X forwarding === | + | |
| - | By Vsevolod Chestnov | + | |
| - | + | ||
| - | How to setup `X11` forwarding on `compute_node` via `apptainer` | + | |
| - | + | ||
| - | - Create a file `config` with the following content:<code> | + | |
| - | Bootstrap: docker | + | |
| - | From: ubuntu: | + | |
| - | + | ||
| - | %post | + | |
| - | apt-get update -y | + | |
| - | apt-get install -y openssh-server | + | |
| - | # some tools, remove if not needed | + | |
| - | apt-get install -y vim firefox | + | |
| - | + | ||
| - | %startscript | + | |
| - | echo ' | + | |
| - | sed -i ' | + | |
| - | sed -i ' | + | |
| - | sed -i ' | + | |
| - | sed -i ' | + | |
| - | mkdir / | + | |
| - | chmod 700 / | + | |
| - | # / | + | |
| - | - Then build the container, here we call it `ubuntu16`< | + | |
| - | apptainer build --sandbox --force ubuntu16 config</ | + | |
| - | - Next go to the `compute_node` (say `mtx27` -- you need to have an active reservation)< | + | |
| - | ssh compute_node</ | + | |
| - | - Create an instance of the `ubuntu16` container and call it `test`< | + | |
| - | apptainer instance start -f -w ubuntu16 test</ | + | |
| - | - Jump into the `test` instance< | + | |
| - | apptainer shell instance:// | + | |
| - | - Once inside, run the `sshd` daemon< | + | |
| - | / | + | |
| - | - In a new shell to test things connect to the running instance use `root` as the username< | + | |
| - | ssh -X -p 12121 root@localhost</ | + | |
| - | firefox</ | + | |
| - | - To connect from the outside one possibility | + | |
| - | ssh -L2010: | + | |
| - | - And then access via< | + | |
| - | ssh -X -p 2010 root@localhost</code>from your machine | + | |
| - | - Done! Now you may run GUI applications on `compute_node` (like `firefox` and `Mathematica` frontend) and their graphical output will be forwarded to your machine' | + | |
oph/cluster/apptainer.1702907321.txt.gz · Ultima modifica: da diego.zuccato@unibo.it
