From 526a13bcc7e171bcb308094cc9006f544b48982f Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Mon, 13 Jan 2025 18:29:42 +0100 Subject: [PATCH] enh: add socket errors' section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings the new documentation in *MRIQC* over here. Co-authored-by: Victor Férat --- docs/apps/singularity.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/apps/singularity.md b/docs/apps/singularity.md index adc485b..2391a9f 100644 --- a/docs/apps/singularity.md +++ b/docs/apps/singularity.md @@ -186,7 +186,7 @@ the templates that are used, e.g., in the atlas-based brain extraction step or spatial normalization. Default settings in the Singularity image should get along with the -Singularity installation of your system. However, deviations from the +*Singularity* installation of your system. However, deviations from the default configurations of your installation may break this compatibility. A particularly problematic case arises when the home directory is mounted in the container, but the `$HOME` environment @@ -257,7 +257,7 @@ endpoints), then you can try the following: --cleanenv fmriprep.simg ``` Otherwise, [some users have succeeded pre-fetching the necessary - templates onto the TemplateFlow directory to then bind the folder at + templates onto the *TemplateFlow* directory to then bind the folder at execution](https://neurostars.org/t/problems-using-pediatric-template-from-templateflow/4566/15): ```Shell @@ -277,6 +277,27 @@ $ singularity run -B ${TEMPLATEFLOW_HOME:-$HOME/.cache/templateflow}:/templatefl --cleanenv fmriprep.simg ``` +## *Socket errors* when running parallel processes on HPC + +When running multiple instances of a *NiPreps* on HPC, you may encounter +errors like [`nipreps/mriqc#1170`](https://github.com/nipreps/mriqc/issues/1170): + +``` text +OSError: [Errno 98] Address already in use +``` + +To solve this issue, you can try to isolate the container network from +the host network by using the `--network none` setting of *Singularity*/*Apptainer*: + +``` shell +apptainer run --net --network none ... +``` + +This solution prevents the container from accessing the Internet and from +downloading data, for example, templates. +Please follow the previous section's guidelines to pre-fetch templates +and then making them accessible. + ## Troubleshooting Setting up a functional execution framework with Singularity might be