Skip to content

Commit e790884

Browse files
committed
fix documentation, closes #1816
1 parent acb5d1a commit e790884

File tree

1 file changed

+32
-11
lines changed

1 file changed

+32
-11
lines changed

doc/devel/testing_nipype.rst

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,47 @@ This will skip any tests that require matlab.
107107
Testing Nipype using Docker
108108
---------------------------
109109

110-
As of :code:`nipype-0.13`, Nipype is tested inside Docker containers. Once the developer
111-
`has installed the Docker Engine <https://docs.docker.com/engine/installation/>`_, testing
112-
Nipype is as easy as follows::
110+
As of :code:`nipype-0.13`, Nipype is tested inside Docker containers. First, install the
111+
`Docker Engine <https://docs.docker.com/engine/installation/>`_.
112+
Nipype has one base docker image called nipype/nipype, and several additional test images
113+
for various Python versions.
114+
115+
The base nipype/nipype image is built as follows::
113116

114117
cd path/to/nipype/
115-
docker build -f docker/nipype_test/Dockerfile_py27 -t nipype/nipype_test:py27
116-
docker run -it --rm -v /etc/localtime:/etc/localtime:ro \
117-
-e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
118+
docker build -t nipype/nipype .
119+
120+
This base image contains several useful tools (FreeSurfer, AFNI, FSL, ANTs, etc.) and
121+
a nipype installation, all in Python 3.5.
122+
It is possible to fetch a built image from the latest master branch of nipype
123+
using::
124+
125+
docker run -it --rm nipype/nipype:master
126+
127+
128+
The docker run command will then open the container and offer a bash shell for the
129+
developer.
130+
131+
The additional test images have several test scripts installed. For instance,
132+
to build and run all tests on Python 2.7::
133+
134+
cd path/to/nipype/
135+
docker build -f docker/Dockerfile_py27 -t nipype/nipype_test:py27 .
136+
docker run -it --rm -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
118137
-v ~/examples:/root/examples:ro \
119138
-v ~/scratch:/scratch \
120139
-w /root/src/nipype \
121-
nipype/nipype_test:py27 /usr/bin/run_pytest.sh
140+
nipype/nipype_test:py27 /usr/bin/run_pytests.sh
122141

123142
For running nipype in Python 3.5::
124143

125144
cd path/to/nipype/
126-
docker build -f docker/nipype_test/Dockerfile_py35 -t nipype/nipype_test:py35
127-
docker run -it --rm -v /etc/localtime:/etc/localtime:ro \
128-
-e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
145+
docker build -f docker/Dockerfile_py35 -t nipype/nipype_test:py35 .
146+
docker run -it --rm -e FSL_COURSE_DATA="/root/examples/nipype-fsl_course_data" \
129147
-v ~/examples:/root/examples:ro \
130148
-v ~/scratch:/scratch \
131149
-w /root/src/nipype \
132-
nipype/nipype_test:py35 /usr/bin/run_pytest.sh
150+
nipype/nipype_test:py35 /usr/bin/run_pytests.sh
151+
152+
The last two examples assume that the example data is downladed into ~/examples and
153+
the ~/scratch folder will be created if it does not exist previously.

0 commit comments

Comments
 (0)