Skip to content
Snippets Groups Projects
Commit 021a5d94 authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Review singularity hints

parent c306c04b
No related branches found
No related tags found
4 merge requests!333Draft: update NGC containers,!322Merge preview into main,!319Merge preview into main,!308Containers
......@@ -34,6 +34,9 @@ execution. Follow the instructions for [locally install Singularity](#local-inst
[container creation](#container-creation). Moreover, existing Docker container can easily be
converted, which is documented [here](#importing-a-docker-container).
If you are already familar with Singularity, you might be more intressted in our [singularity recipe
hints](singularity_recipe_hints.md).
<!--ZIH wiki sites:-->
<!--- [Example Definitions](singularity_example_definitions.md)-->
......
# Singularity Recipe Hints
## GUI (X11) applications
## GUI (X11) Applications
Running GUI applications inside a singularity container is possible out of the box. Check the
following definition:
......@@ -15,25 +15,25 @@ yum install -y xeyes
This image may be run with
```Bash
```console
singularity exec xeyes.sif xeyes.
```
This works because all the magic is done by singularity already like setting $DISPLAY to the outside
display and mounting $HOME so $HOME/.Xauthority (X11 authentication cookie) is found. When you are
using \`--contain\` or \`--no-home\` you have to set that cookie yourself or mount/copy it inside
the container. Similar for \`--cleanenv\` you have to set $DISPLAY e.g. via
This works because all the magic is done by Singularity already like setting `$DISPLAY` to the outside
display and mounting `$HOME` so `$HOME/.Xauthority` (X11 authentication cookie) is found. When you are
using `--contain` or `--no-home` you have to set that cookie yourself or mount/copy it inside
the container. Similar for `--cleanenv` you have to set `$DISPLAY`, e.g., via
```Bash
```console
export SINGULARITY_DISPLAY=$DISPLAY
```
When you run a container as root (via \`sudo\`) you may need to allow root for your local display
When you run a container as root (via `sudo`) you may need to allow root for your local display
port: `xhost +local:root\`
### Hardware acceleration
### Hardware Acceleration
If you want hardware acceleration you **may** need [VirtualGL](https://virtualgl.org). An example
If you want hardware acceleration, you **may** need [VirtualGL](https://virtualgl.org). An example
definition file is as follows:
```Bash
......@@ -55,25 +55,28 @@ rm VirtualGL-*.rpm
yum install -y mesa-dri-drivers # for e.g. intel integrated GPU drivers. Replace by your driver
```
You can now run the application with vglrun:
You can now run the application with `vglrun`:
```Bash
```console
singularity exec vgl.sif vglrun glxgears
```
**Attention:**Using VirtualGL may not be required at all and could even decrease the performance. To
check install e.g. glxgears as above and your graphics driver (or use the VirtualGL image from
above) and disable vsync:
!!! warning
```
Using VirtualGL may not be required at all and could even decrease the performance.
To check install, e.g., `glxgears` as above and your graphics driver (or use the VirtualGL image
from above) and disable `vsync`:
```console
vblank_mode=0 singularity exec vgl.sif glxgears
```
Compare the FPS output with the glxgears prefixed by vglrun (see above) to see which produces more
Compare the FPS output with the `glxgears` prefixed by `vglrun` (see above) to see which produces more
FPS (or runs at all).
**NVIDIA GPUs** need the `--nv` parameter for the singularity command:
**NVIDIA GPUs** need the `--nv` parameter for the Singularity command:
``Bash
``console
singularity exec --nv vgl.sif glxgears
```
......@@ -9,8 +9,10 @@ benchmarking
BLAS
broadwell
bsub
bullx
ccNUMA
centauri
CentOS
citable
conda
CPU
......@@ -30,6 +32,7 @@ DFG
DistributedDataParallel
DockerHub
Dockerfile
Dockerfiles
dockerized
EasyBuild
ecryptfs
......@@ -49,6 +52,8 @@ GBit
GFLOPS
gfortran
GiB
GitHub
glibc
gnuplot
GPU
GPUs
......@@ -142,6 +147,7 @@ queue
randint
reachability
README
RHEL
Rmpi
rome
romeo
......@@ -196,6 +202,7 @@ VampirTrace's
vectorization
venv
virtualenv
VirtualGL
WebVNC
WinSCP
Workdir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment