Skip to content

Commit 017c501

Browse files
authored
[docs only] Fix building
1 parent 00b880d commit 017c501

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

docs/installation.rst

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,35 @@ what is included in the latest Docker images.
6666
Singularity Container
6767
=====================
6868

69-
For security reasons, many HPCs (e.g., TACC) do not allow Docker containers, but do allow `Singularity <https://github.com/singularityware/singularity>`_ containers.
69+
For security reasons, many HPCs (e.g., TACC) do not allow Docker containers, but do
70+
allow `Singularity <https://github.com/singularityware/singularity>`_ containers.
7071

7172
Preparing a Singularity image (Singualrity version >= 2.5)
7273
----------------------------------------------------------
73-
If the version of Singularity on your HPC is modern enough you can create Singularity image directly on the HCP.
74+
If the version of Singularity on your HPC is modern enough you can create Singularity
75+
image directly on the HCP.
7476
This is as simple as
7577

7678
$ singularity build /my_images/fmriprep-<version>.simg docker://poldracklab/mriqc:<version>
7779

78-
Where ``<version>`` should be replaced with the desired version of FMRIPREP that you want to download.
80+
Where ``<version>`` should be replaced with the desired version of fMRIPrep that you want to download.
7981

8082

8183
Preparing a Singularity image (Singualrity version < 2.5)
8284
---------------------------------------------------------
8385
In this case, start with a machine (e.g., your personal computer) with Docker installed.
84-
Use `docker2singularity <https://github.com/singularityware/docker2singularity>`_ to create a singularity image. You will need an active internet connection and some time. ::
86+
Use `docker2singularity <https://github.com/singularityware/docker2singularity>`_ to
87+
create a singularity image.
88+
You will need an active internet connection and some time. ::
8589

8690
$ docker run --privileged -t --rm \
8791
-v /var/run/docker.sock:/var/run/docker.sock \
8892
-v D:\host\path\where\to\output\singularity\image:/output \
8993
singularityware/docker2singularity \
9094
poldracklab/fmriprep:<version>
9195

92-
Where ``<version>`` should be replaced with the desired version of FMRIPREP that you want to download.
96+
Where ``<version>`` should be replaced with the desired version of fMRIPrep that you want
97+
to download.
9398

9499
Beware of the back slashes, expected for Windows systems.
95100
For \*nix users the command translates as follows: ::
@@ -117,22 +122,33 @@ If the data to be preprocessed is also on the HPC, you are ready to run fmriprep
117122

118123
.. note::
119124

120-
Singularity by default `exposes all environment variables from the host inside the container <https://github.com/singularityware/singularity/issues/445>`_.
121-
Because of this your host libraries (such as nipype) could be accidentally used instead of the ones inside the container - if they are included in PYTHONPATH.
122-
To avoid such situation we recommend using the ``--clearenv`` singularity flag in production use. For example: ::
125+
Singularity by default `exposes all environment variables from the host inside
126+
the container <https://github.com/singularityware/singularity/issues/445>`_.
127+
Because of this your host libraries (such as nipype) could be accidentally used
128+
instead of the ones inside the container - if they are included in ``PYTHONPATH``.
129+
To avoid such situation we recommend using the ``--clearenv`` singularity flag
130+
in production use. For example: ::
123131

124132
$ singularity run --clearenv ~/poldracklab_fmriprep_latest-2016-12-04-5b74ad9a4c4d.img \
125133
/work/04168/asdf/lonestar/ $WORK/lonestar/output \
126134
participant \
127135
--participant-label 387 --nthreads 16 -w $WORK/lonestar/work \
128136
--omp-nthreads 16
137+
138+
or, unset the ``PYTHONPATH`` variable before running:
139+
140+
$ unset PYTHONPATH; singularity run ~/poldracklab_fmriprep_latest-2016-12-04-5b74ad9a4c4d.img \
141+
/work/04168/asdf/lonestar/ $WORK/lonestar/output \
142+
participant \
143+
--participant-label 387 --nthreads 16 -w $WORK/lonestar/work \
144+
--omp-nthreads 16
129145
130146
.. note::
131147

132-
Depending on how Singualrity is configured on your cluster it might or might not automatically bind (mount or expose)
133-
host folders to the container.
134-
If this is not done automatically you will need to bind the necessary folders using the ``-B <host_folder>:<container_folder``
135-
Singularity flag.
148+
Depending on how Singularity is configured on your cluster it might or might not
149+
automatically bind (mount or expose) host folders to the container.
150+
If this is not done automatically you will need to bind the necessary folders using
151+
the ``-B <host_folder>:<container_folder`` Singularity flag.
136152
For example: ::
137153

138154
$ singularity run --clearenv -B /work:/work ~/poldracklab_fmriprep_latest-2016-12-04-5b74ad9a4c4d.simg \
@@ -144,9 +160,10 @@ Singularity flag.
144160
Manually Prepared Environment
145161
=============================
146162

147-
.. note::
163+
.. warning::
148164

149-
This method is not recommended! Make sure you would rather do this than use a `Docker Container`_ or a `Singularity Container`_.
165+
This method is not recommended! Make sure you would rather do this than
166+
use a `Docker Container`_ or a `Singularity Container`_.
150167

151168
Make sure all of fmriprep's `External Dependencies`_ are installed.
152169
These tools must be installed and their binaries available in the
@@ -218,7 +235,7 @@ would be equivalent to the latest example: ::
218235
External Dependencies
219236
=====================
220237

221-
``fmriprep`` is implemented using nipype_, but it requires some other neuroimaging
238+
FMRIPrep is implemented using nipype_, but it requires some other neuroimaging
222239
software tools:
223240

224241
- FSL_ (version 5.0.9)

0 commit comments

Comments
 (0)