Skip to content

Commit b5e31bb

Browse files
Add singularity.libraryDir to config page (#5498) [ci skip]
Signed-off-by: Christopher Hakkaart <[email protected]>
1 parent 508af3b commit b5e31bb

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

docs/container.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Read the {ref}`Process scope <config-process>` section to learn more about proce
9494

9595
Nextflow is able to transparently pull remote container images stored in any Docker compatible registry.
9696

97-
By default when a container name is specified, Nextflow checks if an image file with that name exists in the local file system. If that image file exists, it's used to execute the container. If a matching file does not exist, Nextflow automatically tries to pull an image with the specified name from the container registry.
97+
By default, when a container name is specified, Nextflow checks if an image file with that name exists in the local file system. If that image file exists, it's used to execute the container. If a matching file does not exist, Nextflow automatically tries to pull an image with the specified name from the container registry.
9898

9999
If you want Nextflow to check only for local file images, prefix the container name with the `file://` pseudo-protocol. For example:
100100

@@ -107,7 +107,7 @@ apptainer.enabled = true
107107
Use three `/` slashes to specify an **absolute** file path, otherwise the path will be interpreted as relative to the workflow launch directory.
108108
:::
109109

110-
To pull images from Apptainer Hub or a third party Docker registry, simply prefix the image name with the `shub://`, `docker://` or `docker-daemon://` pseudo-protocol as required by Apptainer. For example:
110+
To pull images from Apptainer Hub or a third party Docker registry, prefix the image name with the `shub://`, `docker://` or `docker-daemon://` pseudo-protocol as required by Apptainer. For example:
111111

112112
```groovy
113113
process.container = 'docker://quay.io/biocontainers/multiqc:1.3--py35_2'
@@ -120,11 +120,11 @@ You do not need to specify `docker://` to pull from a Docker repository. Nextflo
120120
This feature requires the `apptainer` tool to be installed where the workflow execution is launched (as opposed to the compute nodes).
121121
:::
122122

123-
Nextflow caches those images in the `apptainer` directory in the pipeline work directory by default. However it is suggested to provide a centralised cache directory by using either the `NXF_APPTAINER_CACHEDIR` environment variable or the `apptainer.cacheDir` setting in the Nextflow config file.
123+
Nextflow caches Apptainer images in the `apptainer` directory, in the pipeline work directory, by default. However, it is recommended to provide a centralized cache directory using the `NXF_APPTAINER_CACHEDIR` environment variable or the `apptainer.cacheDir` setting in the Nextflow config file.
124124

125-
:::{versionadded} 21.09.0-edge
126-
When looking for a Apptainer image file, Nextflow first checks the *library* directory, and if the image file is not found, the *cache* directory is used as usual. The library directory can be defined either using the `NXF_APPTAINER_LIBRARYDIR` environment variable or the `apptainer.libraryDir` configuration setting (the latter overrides the former).
127-
:::
125+
Nextflow uses the library directory to determine the location of Apptainer containers. The library directory can be defined using the `apptainer.libraryDir` configuration setting or the `NXF_APPTAINER_LIBRARYDIR` environment variable. The configuration file option overrides the environment variable if both are set.
126+
127+
Nextflow first checks the library directory when searching for the image. If the image is not found it then checks the cache directory. The main difference between the library directory and the cache directory is that the first is assumed to be a read-only container repository, while the latter is expected to be writable path where container images can added for caching purposes.
128128

129129
:::{warning}
130130
When using a compute cluster, the Apptainer cache directory must reside in a shared filesystem accessible to all compute nodes.
@@ -653,11 +653,11 @@ process.container = 'library://library/default/alpine:3.8'
653653

654654
The `library://` pseudo-protocol allows you to import Singularity images from a local Docker installation instead of downloading them from a Docker registry. This feature requires the `singularity` tool to be installed where the workflow execution is launched (as opposed to the compute nodes).
655655

656-
Nextflow caches the images in `${NXF_WORK}/singularity` by default. However, it is recommended to define a centralised cache directory using either the `NXF_SINGULARITY_CACHEDIR` environment variable or the `singularity.cacheDir` setting in the Nextflow config file.
656+
Nextflow caches Singularity images in the `singularity` directory, in the pipeline work directory, by default. However, it is recommended to provide a centralized cache directory using the `NXF_SINGULARITY_CACHEDIR` environment variable or the `singularity.cacheDir` setting in the Nextflow config file.
657657

658-
:::{versionadded} 21.09.0-edge
659-
When looking for a Singularity image file, Nextflow first checks the *library* directory, and if the image file is not found, the *cache* directory is used as usual. The library directory can be defined either using the `NXF_SINGULARITY_LIBRARYDIR` environment variable or the `singularity.libraryDir` configuration setting (the latter overrides the former).
660-
:::
658+
Nextflow uses the library directory to determine the location of Singularity images. The library directory can be defined using the `singularity.libraryDir` configuration setting or the `NXF_SINGULARITY_LIBRARYDIR` environment variable. The configuration file option overrides the environment variable if both are set.
659+
660+
Nextflow first checks the library directory when searching for the image. If the image is not found it then checks the cache directory. The main difference between the library directory and the cache directory is that the first is assumed to be a read-only container repository, while the latter is expected to be writable path where container images can added for caching purposes.
661661

662662
:::{warning}
663663
When using a compute cluster, the Singularity cache directory must reside in a shared filesystem accessible to all compute nodes.

docs/reference/config.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ The following settings are available:
5252
`apptainer.envWhitelist`
5353
: Comma separated list of environment variable names to be included in the container environment.
5454

55+
`apptainer.libraryDir`
56+
: Directory where remote Apptainer images are retrieved. When using a computing cluster it must be a shared folder accessible to all compute nodes.
57+
5558
`apptainer.noHttps`
5659
: Pull the Apptainer image with http protocol (default: `false`).
5760

@@ -1375,6 +1378,9 @@ The following settings are available:
13751378
`singularity.envWhitelist`
13761379
: Comma separated list of environment variable names to be included in the container environment.
13771380

1381+
`singularity.libraryDir`
1382+
: Directory where remote Singularity images are retrieved. When using a computing cluster it must be a shared folder accessible to all compute nodes.
1383+
13781384
`singularity.noHttps`
13791385
: Pull the Singularity image with http protocol (default: `false`).
13801386

0 commit comments

Comments
 (0)