Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:singularity:caviness [2018-08-09 11:57] – [Copy a container from a registry] anita | software:singularity:caviness [2024-08-27 17:51] (current) – anita | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======= Singularity on Caviness ====== | + | ======= |
===== Build a Singularity container ===== | ===== Build a Singularity container ===== | ||
- | There are several ways to get a Singularity container onto Caviness. | + | There are several ways to get a Singularity container onto Caviness, but here are the two to consider using if reproducibility is important. |
- | * You can build a Singularity container from a Docker | + | * You can build a Singularity container from a Docker |
- | * You can copy a container from a container registry to Caviness. | + | * You can build a container on your local system and copy it to Caviness. |
- | * You can build a container on your local system and copy it to Caviness | + | |
- | ==== Build Singularity container from a Docker | + | ==== Build a Singularity container from Docker |
- | Caviness does not support Docker, but you can build a Singularity container from an existing Docker container. Starting on the head node, load the Singularity software into your environment using VALET, and build your container. | + | Caviness does not support Docker, but you can build a Singularity container from an existing Docker container |
+ | |||
+ | === Docker Hub example === | ||
< | < | ||
Line 18: | Line 19: | ||
</ | </ | ||
- | ==== Copy a container from a registry ==== | + | === Singularity Hub example |
- | Another option is to copy an existing Singularity container from a registry. Use the '' | ||
- | |||
- | To copy a container from a registry: | ||
- | |||
- | - Log in to Caviness | ||
- | - Load singularity via VALET | ||
< | < | ||
- | vpkg_require singularity | + | $ vpkg_require singularity |
+ | $ singularity build hello-world.simg shub:// | ||
</ | </ | ||
- | - Copy the container you want with the singularity pull command. | ||
More details on this can be found in the [[http:// | More details on this can be found in the [[http:// | ||
Line 39: | Line 34: | ||
You can build your Singularity container on your local system, installing the singularity program if you need to. For more information on how to do this, see the [[http:// | You can build your Singularity container on your local system, installing the singularity program if you need to. For more information on how to do this, see the [[http:// | ||
- | ==== Execute your Singularity container through SLURM ==== | + | ===== Execute your Singularity container through SLURM ===== |
- | Once your container is on Caviness you can run it. Containers must run on Caviness' | + | Once your container is on Caviness you can run it. Containers must run on Caviness' |
- | === Inside your interactive session or your batch job you must first issue the command === | + | ==== Inside your interactive session or your batch job you must first issue the command |
< | < | ||
Line 52: | Line 47: | ||
< | < | ||
- | | + | [traine@login01 ~]$ workgroup -g it_css |
- | salloc: Granted job allocation 844 | + | [(it_css: |
- | salloc: Waiting for resource configuration | + | salloc: Granted job allocation 844 |
- | salloc: Nodes r00n45 are ready for job | + | salloc: Waiting for resource configuration |
- | [traine@r00n45 ~]$ vpkg_require singularity | + | salloc: Nodes r00n45 are ready for job |
- | Adding package `singularity/ | + | [traine@r00n45 ~]$ vpkg_require singularity |
- | [traine@r00n45 ~]$ singularity shell tensorflow.simg | + | Adding package `singularity/ |
- | Singularity: | + | [traine@r00n45 ~]$ singularity shell tensorflow.simg |
+ | Singularity: | ||
+ | |||
+ | Singularity tensorflow.simg: | ||
+ | usage: tensorboard [-h] [--logdir PATH] [--host ADDR] [--port PORT] | ||
+ | | ||
+ | [--db URI] [--inspect] [--tag TAG] [--event_file PATH] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | TensorBoard is a suite of web applications for inspectinng and understanding | ||
+ | your TensorFlow runs and graphs. https:// | ||
+ | |||
+ | Singularity tensorflow.simg: | ||
+ | Cpus_allowed_list: | ||
+ | Singularity tensorflow.simg: | ||
+ | exit | ||
+ | [traine@r00n45 ~]$ | ||
+ | </ | ||
+ | |||
+ | ==== Troubleshooting ==== | ||
+ | |||
+ | === Locale error === | ||
+ | |||
+ | If you experience the error below after starting a particular shell container, then it is likely due to your current locale not being supported in this particular container' | ||
+ | |||
+ | <code bash> | ||
+ | [traine@r00n45 ~]$ vpkg_require singularity | ||
+ | Adding package `singularity/ | ||
+ | [traine@r00n45 ~]$ singularity shell tensorflow.simg | ||
+ | Singularity: | ||
+ | |||
+ | Singularity tensorflow.simg: | ||
+ | Traceback (most recent call last): | ||
+ | File "/ | ||
+ | | ||
+ | File "/ | ||
+ | program.setup_environment() | ||
+ | File "/ | ||
+ | util.setup_logging() | ||
+ | File "/ | ||
+ | locale.setlocale(locale.LC_ALL, | ||
+ | File "/ | ||
+ | return _setlocale(category, | ||
+ | locale.Error: | ||
+ | </ | ||
+ | |||
+ | Once you start the container shell, check which locale' | ||
+ | |||
+ | <code bash> | ||
+ | Singularity tensorflow.simg: | ||
+ | locale: Cannot set LC_CTYPE to default locale: No such file or directory | ||
+ | locale: Cannot set LC_MESSAGES to default locale: No such file or directory | ||
+ | locale: Cannot set LC_COLLATE to default locale: No such file or directory | ||
+ | C | ||
+ | C.UTF-8 | ||
+ | POSIX | ||
+ | </ | ||
+ | |||
+ | Of course in this particular case, the locale setting for account '' | ||
+ | |||
+ | <code bash> | ||
+ | [traine@r00n45 ~]$ vpkg_require singularity | ||
+ | Adding package `singularity/ | ||
+ | [tainne@r00n45 ~]$ LANG=C.UTF-8 singularity shell tensorflow.simg | ||
+ | Singularity: | ||
- | | + | Singularity tensorflow.simg: |
+ | usage: tensorboard [-h] [--logdir PATH] [--host ADDR] [--port PORT] | ||
+ | | ||
+ | [--db URI] [--inspect] [--tag TAG] [--event_file PATH] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | USAGE: /usr/local/bin/ | + | TensorBoard is a suite of web applications for inspectinng and understanding |
+ | your TensorFlow runs and graphs. https://github.com/tensorflow/ | ||
- | Try --helpfull to get a list of all flags. | + | [[ lots of additional information displayed for optional arguments |
- | | + | Singularity tensorflow.simg: |
- | | + | exit |
- | | + | [traine@r00n45 |
</ | </ | ||