@@ -93,9 +93,8 @@ If you need a finer control over the container execution, or you feel comfortabl
9393
9494### Accessing filesystems in the host within the container
9595
96- Containers are confined in a sandbox, so they can't access the host
97- in any ways unless you explicitly prescribe acceptable accesses
98- to the host.
96+ Containers are confined in a sandbox, so they can't access the data on the host
97+ unless explicitly enabled.
9998The Docker Engine provides mounting filesystems into the container with the ` -v ` argument and the following syntax:
10099` -v some/path/in/host:/absolute/path/within/container:ro ` ,
101100where the trailing ` :ro ` specifies that the mount is read-only.
@@ -121,9 +120,10 @@ $ docker run -ti --rm \
121120 participant
122121```
123122
124- When ** debugging** or ** reusing pre-cached intermediate results** ,
125- you'll also need to mount some working directory that otherwise
126- is not exposed by the application.
123+ We recommend mounting a work (or scratch) directory for intermediate workflow results.
124+ This is particularly useful for ** debugging** or ** reusing pre-cached intermediate results** ,
125+ but can also be useful to control where these (large) directories get created,
126+ as the default location for files created inside a docker container may not have sufficient space.
127127In the case of * NiPreps* , we typically inform the * BIDS Apps*
128128to override the work directory by setting the ` -w ` /` --work-dir `
129129argument (please note that this is not defined by the * BIDS Apps*
@@ -155,12 +155,10 @@ $ docker run -ti --rm \
155155
156156 ``` {.shell hl_lines="4 5 9"}
157157 $ docker run -ti --rm \
158- -v path/to/data:/data:ro \
159- -v path/to/output:/out \
160- -v $PWD:$PWD \
161- -w $PWD \ # DO NOT confuse with the application's work directory
158+ -v $PWD:$PWD \ # Mount the current directory with its own name
159+ -w $PWD \ # DO NOT confuse with the application's work directory
162160 nipreps/fmriprep:<latest-version> \
163- / data /out/out \
161+ inputs/raw- data outputs/fmriprep \ # With YODA, the inputs are inside the working directory
164162 participant
165163 -w $PWD/work
166164 ```
@@ -185,7 +183,7 @@ $ docker run -ti --rm \
185183for atlases and templates management may require
186184the * TemplateFlow Archive* be mounted from the host.
187185Mounting the * Archive* from the host is an effective way
188- to preempt the download of your favorite templates in every run :
186+ to prevent multiple downloads of templates that are not bundled in the image :
189187
190188``` {.shell hl_lines="5 6"}
191189$ docker run -ti --rm \
@@ -226,21 +224,21 @@ account in *Linux*.
226224In other words, by default * Docker* will use the superuser account
227225to execute the container and will write files with the corresponding
228226uid=0 unless configured otherwise.
229- Executing as superuser may derive in permissions and security issues,
227+ Executing as superuser may result in permissions and security issues,
230228for example, [ with * DataLad* (discussed later)] ( datalad.md# ) .
231229One paramount example of permissions issues where beginners typically
232230run into is deleting files after a containerized execution.
233231If the uid is not overridden, the outputs of a containerized execution
234232will be owned by ** root** and group ** root** .
235233Therefore, normal users will not be able to modify the output and
236- superuser permissions will be required to deleted data generated
234+ superuser permissions will be required to delete data generated
237235by the containerized application.
238236Some shared systems only allow running containers as a normal user
239- because the user will not be able to action on the outputs otherwise.
237+ because the user will not be able to operate on the outputs otherwise.
240238
241- Either way (whether the container is available with default settings
242- or the execution has been customized to normal users) ,
243- running as a normal user allows preempting these permissions issues.
239+ Whether the container is available with default settings,
240+ or the execution has been customized to normal users,
241+ running as a normal user avoids these permissions issues.
244242This can be achieved with
245243[ * Docker* 's ` -u ` /` --user ` option] ( https://docs.docker.com/engine/containers/run/#user ) :
246244
@@ -286,8 +284,8 @@ command line follows the interface defined by the specific
286284[ * fMRIPrep* ] ( https://fmriprep.readthedocs.io/en/latest/usage.html )
287285or [ * MRIQC* ] ( https://mriqc.readthedocs.io/en/latest/running.html#command-line-interface ) ).
288286
289- The first section of a call comprehends arguments specific to * Docker* ,
290- and configure the execution of the container:
287+ The first section of a call consists of arguments specific to * Docker* ,
288+ which configure the execution of the container:
291289
292290``` {.shell hl_lines="1-7"}
293291$ docker run -ti --rm \
0 commit comments