Skip to content

Commit 526a13b

Browse files
committed
enh: add socket errors' section
Brings the new documentation in *MRIQC* over here. Co-authored-by: Victor Férat <[email protected]>
1 parent df416d0 commit 526a13b

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

Diff for: docs/apps/singularity.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ the templates that are used, e.g., in the atlas-based brain extraction
186186
step or spatial normalization.
187187

188188
Default settings in the Singularity image should get along with the
189-
Singularity installation of your system. However, deviations from the
189+
*Singularity* installation of your system. However, deviations from the
190190
default configurations of your installation may break this
191191
compatibility. A particularly problematic case arises when the home
192192
directory is mounted in the container, but the `$HOME` environment
@@ -257,7 +257,7 @@ endpoints), then you can try the following:
257257
--cleanenv fmriprep.simg <fmriprep arguments>
258258
```
259259
Otherwise, [some users have succeeded pre-fetching the necessary
260-
templates onto the TemplateFlow directory to then bind the folder at
260+
templates onto the *TemplateFlow* directory to then bind the folder at
261261
execution](https://neurostars.org/t/problems-using-pediatric-template-from-templateflow/4566/15):
262262

263263
```Shell
@@ -277,6 +277,27 @@ $ singularity run -B ${TEMPLATEFLOW_HOME:-$HOME/.cache/templateflow}:/templatefl
277277
--cleanenv fmriprep.simg <fmriprep arguments>
278278
```
279279

280+
## *Socket errors* when running parallel processes on HPC
281+
282+
When running multiple instances of a *NiPreps* on HPC, you may encounter
283+
errors like [`nipreps/mriqc#1170`](https://github.com/nipreps/mriqc/issues/1170):
284+
285+
``` text
286+
OSError: [Errno 98] Address already in use
287+
```
288+
289+
To solve this issue, you can try to isolate the container network from
290+
the host network by using the `--network none` setting of *Singularity*/*Apptainer*:
291+
292+
``` shell
293+
apptainer run --net --network none ...
294+
```
295+
296+
This solution prevents the container from accessing the Internet and from
297+
downloading data, for example, templates.
298+
Please follow the previous section's guidelines to pre-fetch templates
299+
and then making them accessible.
300+
280301
## Troubleshooting
281302
282303
Setting up a functional execution framework with Singularity might be

0 commit comments

Comments
 (0)