From 75c1acb8ed724fbfddfd184a57a58ed1fd9997f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20F=C3=A9rat?= Date: Mon, 26 Aug 2024 16:28:55 +0200 Subject: [PATCH 1/3] Add a HPC troubleshooting section --- docs/source/running.rst | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/source/running.rst b/docs/source/running.rst index 3360d2bd..7641738e 100644 --- a/docs/source/running.rst +++ b/docs/source/running.rst @@ -112,6 +112,53 @@ on ds030 of OpenfMRI: the 1-task example, a rule of thumb may be that each task takes around 1GB of memory. +Known issues with HPC +..................... + +#. No internet access + + The container needs to download the templates from the internet. + If the container does not have internet access, you can download the + templates manually using the templateflow library: + + .. code-block:: python + + import templateflow.api + templateflow.api.TF_S3_ROOT = 'http://templateflow.s3.amazonaws.com' + templateflow.api.get('MNI152NLin2009cAsym') # change template if needed + + + then provide the templates to the container by mounting the ``TEMPLATEFLOW_HOME`` folder and setting the ``TEMPLATEFLOW_HOME`` environment variable: + + .. code-block:: bash + + apptainer run -v /path/to/templates:/path/to/templateflow --env TEMPLATEFLOW_HOME=/path/to/templateflow ... + +#. Socket error: + + When running multiple instances of MRIQC on HPC, you may encounter the following error: + + .. code-block:: python + + 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`` option. + + .. code-block:: bash + + apptainer run --net --network none ... + + This solution might prevent the container from accessing the internet and downloading templates. + In this case, you can download the templates manually and mount provide access to the templates as explained in the previous section. + + .. code-block:: bash + + apptainer run --net --network none -v /path/to/templates:/path/to/templateflow --env TEMPLATEFLOW_HOME=/path/to/templateflow ... + + + + + .. topic:: References .. [BIDS] `Brain Imaging Data Structure `_ From 8ca691c6da6bd696b6312dd1805bb956ba365807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20F=C3=A9rat?= Date: Mon, 26 Aug 2024 16:42:40 +0200 Subject: [PATCH 2/3] Update running.rst --- docs/source/running.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/running.rst b/docs/source/running.rst index 7641738e..f3d67b1c 100644 --- a/docs/source/running.rst +++ b/docs/source/running.rst @@ -128,15 +128,15 @@ Known issues with HPC templateflow.api.get('MNI152NLin2009cAsym') # change template if needed - then provide the templates to the container by mounting the ``TEMPLATEFLOW_HOME`` folder and setting the ``TEMPLATEFLOW_HOME`` environment variable: + then provide the templates to the container by mounting the ``templateflow`` home directory and setting the ``TEMPLATEFLOW_HOME`` environment variable: .. code-block:: bash - apptainer run -v /path/to/templates:/path/to/templateflow --env TEMPLATEFLOW_HOME=/path/to/templateflow ... + apptainer run -v /path/to/templateflow:/path/to/templates --env TEMPLATEFLOW_HOME=/path/to/templates ... #. Socket error: - When running multiple instances of MRIQC on HPC, you may encounter the following error: + When running multiple instances of MRIQC on a HPC, you may encounter the following error: .. code-block:: python @@ -149,7 +149,7 @@ Known issues with HPC apptainer run --net --network none ... This solution might prevent the container from accessing the internet and downloading templates. - In this case, you can download the templates manually and mount provide access to the templates as explained in the previous section. + In this case, you can download the templates manually and provide access to the downloaded files as explained in the previous section. .. code-block:: bash From c1feacb158e78abb5918256ff513e55481e7121f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20F=C3=A9rat?= Date: Mon, 26 Aug 2024 16:45:18 +0200 Subject: [PATCH 3/3] Update running.rst --- docs/source/running.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/running.rst b/docs/source/running.rst index f3d67b1c..ddd57a3c 100644 --- a/docs/source/running.rst +++ b/docs/source/running.rst @@ -119,7 +119,7 @@ Known issues with HPC The container needs to download the templates from the internet. If the container does not have internet access, you can download the - templates manually using the templateflow library: + templates manually using the ``templateflow`` library: .. code-block:: python @@ -153,7 +153,7 @@ Known issues with HPC .. code-block:: bash - apptainer run --net --network none -v /path/to/templates:/path/to/templateflow --env TEMPLATEFLOW_HOME=/path/to/templateflow ... + apptainer run --net --network none -v /path/to/templateflow:/path/to/templates --env TEMPLATEFLOW_HOME=/path/to/templates ...