@@ -26,20 +26,33 @@ In order to run fmriprep in a Docker container, Docker must be `installed
26
26
<https://docs.docker.com/engine/installation/> `_.
27
27
Once Docker is installed, the recommended way to run fmriprep is to use the
28
28
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)
29
31
30
32
To install::
31
33
32
34
$ pip install --user --upgrade fmriprep-docker
33
35
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.::
36
39
37
40
$ fmriprep-docker /path/to/data/dir /path/to/output/dir participant
38
41
RUNNING: docker run --rm -it -v /path/to/data/dir:/data:ro \
39
42
-v /path/to_output/dir:/out poldracklab/fmriprep:1.0.0 \
40
43
/data /out participant
41
44
...
42
45
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
+
43
56
You may also invoke ``docker `` directly::
44
57
45
58
$ docker run -ti --rm \
@@ -76,14 +89,14 @@ image directly on the HCP.
76
89
This is as simple as: ::
77
90
78
91
$ singularity build /my_images/fmriprep-<version>.simg docker://poldracklab/fmriprep:<version>
79
-
92
+
80
93
Where ``<version> `` should be replaced with the desired version of fMRIPrep that you want to download.
81
94
82
95
83
96
Preparing a Singularity image (Singularity version < 2.5)
84
97
---------------------------------------------------------
85
98
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
87
100
create a singularity image.
88
101
You will need an active internet connection and some time. ::
89
102
@@ -93,7 +106,7 @@ You will need an active internet connection and some time. ::
93
106
singularityware/docker2singularity \
94
107
poldracklab/fmriprep:<version>
95
108
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
97
110
to download.
98
111
99
112
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
122
135
123
136
.. note ::
124
137
125
- Singularity by default `exposes all environment variables from the host inside
138
+ Singularity by default `exposes all environment variables from the host inside
126
139
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
128
141
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
130
143
in production use. For example: ::
131
144
132
145
$ 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
147
160
148
161
.. note ::
149
162
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
153
166
the ``-B <host_folder>:<container_folder> `` Singularity argument.
154
167
For example: ::
155
168
@@ -164,7 +177,7 @@ Manually Prepared Environment (Python 3.5+)
164
177
165
178
.. warning ::
166
179
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
168
181
use a `Docker Container `_ or a `Singularity Container `_.
169
182
170
183
Make sure all of fmriprep's `External Dependencies `_ are installed.
@@ -213,10 +226,10 @@ FMRIPREP uses FreeSurfer tools, which require a license to run.
213
226
To obtain a FreeSurfer license, simply register for free at
214
227
https://surfer.nmr.mgh.harvard.edu/registration.html.
215
228
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 ``
220
233
to pass the license file location to fMRIPrep.
221
234
222
235
It is possible to run the docker container pointing the image to a local path
0 commit comments