Skip to content

Commit 42830d0

Browse files
Installation edits
Added documentation to fmriprep-docker call
1 parent 8653558 commit 42830d0

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

docs/installation.rst

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,33 @@ In order to run fmriprep in a Docker container, Docker must be `installed
2626
<https://docs.docker.com/engine/installation/>`_.
2727
Once Docker is installed, the recommended way to run fmriprep is to use the
2828
fmriprep-docker_ wrapper, which requires Python and an Internet connection.
29+
``fmriprep-docker`` is a streamlined command to run fmriprep without having to
30+
properly mount directories (``fmriprep-docker`` does this for you)
2931

3032
To install::
3133

3234
$ pip install --user --upgrade fmriprep-docker
3335

34-
When run, ``fmriprep-docker`` will generate a Docker command line for you,
35-
print it out for reporting purposes, and then run the command, e.g.::
36+
When you run, ``fmriprep-docker`` it will generate a Docker command line for you,
37+
print it out for reporting purposes, and then run the command without further action
38+
needed, e.g.::
3639

3740
$ fmriprep-docker /path/to/data/dir /path/to/output/dir participant
3841
RUNNING: docker run --rm -it -v /path/to/data/dir:/data:ro \
3942
-v /path/to_output/dir:/out poldracklab/fmriprep:1.0.0 \
4043
/data /out participant
4144
...
4245

46+
For ``fmriprep-docker`` all the options you would typically pass to fmriprep,
47+
you can use for ``fmriprep-docker``. ``fmriprep-docker`` is mostly mounting
48+
the paths and environmental variables.
49+
50+
We have published a `step-by-step tutorial
51+
<http://reproducibility.stanford.edu/fmriprep-tutorial-running-the-docker-image/>`_
52+
illustrating how to run ``fmriprep-docker``. This tutorial also provides valuable
53+
troubleshooting insights and advice on what to do after fmriprep has run.
54+
55+
4356
You may also invoke ``docker`` directly::
4457

4558
$ docker run -ti --rm \
@@ -76,14 +89,14 @@ image directly on the HCP.
7689
This is as simple as: ::
7790

7891
$ singularity build /my_images/fmriprep-<version>.simg docker://poldracklab/fmriprep:<version>
79-
92+
8093
Where ``<version>`` should be replaced with the desired version of fMRIPrep that you want to download.
8194

8295

8396
Preparing a Singularity image (Singularity version < 2.5)
8497
---------------------------------------------------------
8598
In this case, start with a machine (e.g., your personal computer) with Docker installed.
86-
Use `docker2singularity <https://github.com/singularityware/docker2singularity>`_ to
99+
Use `docker2singularity <https://github.com/singularityware/docker2singularity>`_ to
87100
create a singularity image.
88101
You will need an active internet connection and some time. ::
89102

@@ -93,7 +106,7 @@ You will need an active internet connection and some time. ::
93106
singularityware/docker2singularity \
94107
poldracklab/fmriprep:<version>
95108

96-
Where ``<version>`` should be replaced with the desired version of fMRIPrep that you want
109+
Where ``<version>`` should be replaced with the desired version of fMRIPrep that you want
97110
to download.
98111

99112
Beware of the back slashes, expected for Windows systems.
@@ -122,11 +135,11 @@ If the data to be preprocessed is also on the HPC, you are ready to run fmriprep
122135

123136
.. note::
124137

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

132145
$ singularity run --cleanenv ~/poldracklab_fmriprep_latest-2016-12-04-5b74ad9a4c4d.img \
@@ -147,9 +160,9 @@ If the data to be preprocessed is also on the HPC, you are ready to run fmriprep
147160

148161
.. note::
149162

150-
Depending on how Singularity is configured on your cluster it might or might not
151-
automatically bind (mount or expose) host folders to the container.
152-
If this is not done automatically you will need to bind the necessary folders using
163+
Depending on how Singularity is configured on your cluster it might or might not
164+
automatically bind (mount or expose) host folders to the container.
165+
If this is not done automatically you will need to bind the necessary folders using
153166
the ``-B <host_folder>:<container_folder>`` Singularity argument.
154167
For example: ::
155168

@@ -164,7 +177,7 @@ Manually Prepared Environment (Python 3.5+)
164177

165178
.. warning::
166179

167-
This method is not recommended! Make sure you would rather do this than
180+
This method is not recommended! Make sure you would rather do this than
168181
use a `Docker Container`_ or a `Singularity Container`_.
169182

170183
Make sure all of fmriprep's `External Dependencies`_ are installed.
@@ -213,10 +226,10 @@ FMRIPREP uses FreeSurfer tools, which require a license to run.
213226
To obtain a FreeSurfer license, simply register for free at
214227
https://surfer.nmr.mgh.harvard.edu/registration.html.
215228

216-
When using manually-prepared environments or singularity, FreeSurfer will search
217-
for a license key file first using the ``$FS_LICENSE`` environment variable and then
218-
in the default path to the license key file (``$FREESURFER_HOME/license.txt``).
219-
If using the ``--cleanenv`` flag and ``$FS_LICENSE`` is set, use ``--fs-license-file $FS_LICENSE``
229+
When using manually-prepared environments or singularity, FreeSurfer will search
230+
for a license key file first using the ``$FS_LICENSE`` environment variable and then
231+
in the default path to the license key file (``$FREESURFER_HOME/license.txt``).
232+
If using the ``--cleanenv`` flag and ``$FS_LICENSE`` is set, use ``--fs-license-file $FS_LICENSE``
220233
to pass the license file location to fMRIPrep.
221234

222235
It is possible to run the docker container pointing the image to a local path

0 commit comments

Comments
 (0)