@@ -107,26 +107,47 @@ This will skip any tests that require matlab.
107
107
Testing Nipype using Docker
108
108
---------------------------
109
109
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::
113
116
114
117
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" \
118
137
-v ~/examples:/root/examples:ro \
119
138
-v ~/scratch:/scratch \
120
139
-w /root/src/nipype \
121
- nipype/nipype_test:py27 /usr/bin/run_pytest .sh
140
+ nipype/nipype_test:py27 /usr/bin/run_pytests .sh
122
141
123
142
For running nipype in Python 3.5::
124
143
125
144
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" \
129
147
-v ~/examples:/root/examples:ro \
130
148
-v ~/scratch:/scratch \
131
149
-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