@@ -23,12 +23,27 @@ Patching working repositories
2323In order to test new code without rebuilding the Docker image, it is
2424possible to mount working repositories as source directories within the
2525container.
26- In the docker container, the all Python packages are installed in
27- ``/usr/local/miniconda/lib/python3.6/site-packages ``.
26+ The `fmriprep-docker `_ script simplifies this for the most common repositories::
2827
29- To patch in working repositories of FMRIPREP or its dependencies, for instance
30- contained in ``$HOME/projects/ ``, add the following arguments to your docker
31- command: ::
28+ -f PATH, --patch-fmriprep PATH
29+ working fmriprep repository (default: None)
30+ -n PATH, --patch-niworkflows PATH
31+ working niworkflows repository (default: None)
32+ -p PATH, --patch-nipype PATH
33+ working nipype repository (default: None)
34+
35+ For instance, if your repositories are contained in ``$HOME/projects ``::
36+
37+ $ fmriprep-docker -f $HOME/projects/fmriprep/fmriprep \
38+ -n $HOME/projects/niworkflows/niworkflows \
39+ -p $HOME/projects/nipype/nipype \
40+ -i poldracklab/fmriprep:latest \
41+ $HOME/fullds005 $HOME/dockerout participant
42+
43+ Note the ``-i `` flag allows you to specify an image.
44+
45+ When invoking ``docker `` directly, the mount options must be specified
46+ with the ``-v `` flag::
3247
3348 -v $HOME/projects/fmriprep/fmriprep:/usr/local/miniconda/lib/python3.6/site-packages/fmriprep:ro
3449 -v $HOME/projects/niworkflows/niworkflows:/usr/local/miniconda/lib/python3.6/site-packages/niworkflows:ro
@@ -41,8 +56,13 @@ For example, ::
4156 poldracklab/fmriprep:latest /data /out/out participant \
4257 -w /out/work/
4358
44- In order to work directly in the container, use ``--entrypoint=bash ``, and
45- omit the fmriprep arguments: ::
59+ In order to work directly in the container, pass the ``--shell `` flag to
60+ ``fmriprep-docker ``::
61+
62+ $ fmriprep-docker --shell $HOME/fullds005 $HOME/dockerout participant
63+
64+ This is the equivalent of using ``--entrypoint=bash `` and omitting the fmriprep
65+ arguments in a ``docker `` command::
4666
4767 $ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \
4868 -v $HOME/projects/fmriprep/fmriprep:/usr/local/miniconda/lib/python3.6/site-packages/fmriprep:ro --entrypoint=bash \
@@ -97,3 +117,7 @@ repository, located in ``~/projects/fmriprep``: ::
97117
98118To work in this image, replace ``poldracklab/fmriprep:latest `` with
99119``fmriprep `` in any of the above commands.
120+ This image may be accessed by the `fmriprep-docker `_ wrapper via the
121+ ``-i `` flag, e.g. ::
122+
123+ $ fmriprep-docker -i fmriprep --shell
0 commit comments