@@ -9,8 +9,9 @@ update an existing environment, as necessary.
9
9
10
10
Development in Docker is encouraged, for the sake of consistency and
11
11
portability.
12
- By default, work should be built off of `poldracklab/fmriprep:latest
13
- <https://hub.docker.com/r/poldracklab/fmriprep/> `_ (see the
12
+ By default, work should be built off of `poldracklab/fmriprep:unstable
13
+ <https://hub.docker.com/r/poldracklab/fmriprep/> `_, which tracks the ``master `` branch,
14
+ or ``poldracklab/fmriprep:latest ``, which tracks the latest release version (see the
14
15
installation _ guide for the basic procedure for running).
15
16
16
17
It will be assumed the developer has a working repository in
@@ -130,6 +131,74 @@ This image may be accessed by the `fmriprep-docker`_ wrapper via the
130
131
131
132
$ fmriprep-docker -i fmriprep --shell
132
133
134
+ Code-Server Development Environment (Experimental)
135
+ ==================================================
136
+ To get the best of working with containers and having an interactive
137
+ development environment, we have an experimental setup with `code-server
138
+ <https://github.com/cdr/code-server> `_.
139
+
140
+ .. Note ::
141
+ We have `a video walking through the process
142
+ <https://youtu.be/bkZ-NyUaTvg> `_ if you want a visual guide.
143
+
144
+ 1. Build the Docker image
145
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
146
+ We will use the ``Dockerfile_devel `` file to build
147
+ our development docker image::
148
+
149
+ $ cd $HOME/projects/fmriprep
150
+ $ docker build -t fmriprep_devel -f Dockerfile_devel .
151
+
152
+ 2. Run the Docker image
153
+ ~~~~~~~~~~~~~~~~~~~~~~~
154
+ We can start a docker container using the image we built (``fmriprep_devel ``)::
155
+
156
+ $ docker run -it -p 127.0.0.1:8445:8080 -v ${PWD}:/src/fmriprep fmriprep_devel:latest
157
+
158
+ .. Note ::
159
+ If you are using windows shell, ${PWD} may not be defined, instead use the absolute
160
+ path to your fmriprep directory.
161
+
162
+ .. Note ::
163
+ If you are using Docker-Toolbox, you will need to change your virtualbox settings
164
+ using `these steps as a guide
165
+ <https://github.com/jdkent/tutDockerRstudio#additional-setup-for-docker-toolbox> `_.
166
+ (For step ``6 ``, instead of ``Name = rstudio; Host Port = 8787; Guest Port = 8787 ``,
167
+ have ``Name = code-server; Host Port = 8443; Guest Port = 8080 ``.)
168
+ Then in the docker command above, change ``127.0.0.1:8445:8080 ``
169
+ to ``192.168.99.100:8445:8080 ``.
170
+
171
+ If the container started correctly, you should see the following on your console::
172
+
173
+ INFO Server listening on http://localhost:8080
174
+ INFO - No authentication
175
+ INFO - Not serving HTTPS
176
+
177
+ Now you can switch to your favorite browser and go to: ``127.0.0.1:8445 ``
178
+ (or ``192.168.99.100:8445 `` for Docker Toolbox).
179
+
180
+ 3. Copy fmriprep.egg-info into your fmriprep directory
181
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182
+ ``fmriprep.egg-info `` makes the fmriprep package exacutable inside the docker container.
183
+ Open a terminal in vscode and type the following::
184
+
185
+ $ cp -R /src/fmriprep.egg-info /src/fmriprep/
186
+
187
+
188
+ Code-Server Development Environment Features
189
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
+
191
+ - The editor is `vscode <https://code.visualstudio.com/docs >`_
192
+
193
+ - There are several preconfigured debugging tests under
194
+ the debugging icon in the activity bar
195
+
196
+ - see `vscode debugging python <https://code.visualstudio.com/docs/python/debugging >`_
197
+ for details.
198
+
199
+ - The ``gitlens `` and ``python `` extensions are preinstalled to improve
200
+ the development experience in vscode.
201
+
133
202
134
203
Adding new features to the citation boilerplate
135
204
===============================================
@@ -163,4 +232,4 @@ An example of how this works is shown here: ::
163
232
(transformation matrices, and six corresponding rotation and translation
164
233
parameters) are estimated before any spatiotemporal filtering using
165
234
`mcflirt` [FSL {fsl_ver}, @mcflirt].
166
- """.format(fsl_ver=fsl.Info().version() or '<ver>')
235
+ """.format(fsl_ver=fsl.Info().version() or '<ver>')
0 commit comments