Closed satra closed 7 years ago
@akeshavan has built the docker image that supports bids/freesurfer, so we could create a new docker image with freesurfer installed and simply update the documentation. What do you think, Anisha?
@satra @binarybottle I started working on it, but then I hit that weird error when compiling travel_depth! This branch has the freesurfer dockerfile https://github.com/BIDS-Apps/mindboggle/blob/freesurfer/Dockerfile#L1 -- I'll take another stab at it later this week!
Will the solution to issue #92 help resolve this?
@satra -- Have I properly included your minimized FreeSurfer from https://github.com/freesurfer/freesurfer/issues/70 in the Dockerfile?: https://github.com/nipy/mindboggle/blob/master/install/Dockerfile.mindboggle.complete#L109
Would you please replace the setup steps above that line with the steps you used?
sth like this should work.
USER $NB_USER
WORKDIR /opt
RUN curl -sSL https://dl.dropbox.com/sh/mvgpn6cml04me6u/AADWHds-ZeRqBvmuNX7_RoUla/recon-all-freesurfer6%2BMCR.min.tgz?dl=0 | tar zx -C /opt && \
( echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh )
ENV OS=Linux \
FS_OVERRIDE=0 \
FIX_VERTEX_AREA= \
FSF_OUTPUT_FORMAT=nii.gz \
FREESURFER_HOME=/opt/freesurfer
ENV SUBJECTS_DIR=/subjects \
MNI_DIR=$FREESURFER_HOME/mni \
LOCAL_DIR=$FREESURFER_HOME/local \
MINC_BIN_DIR=$FREESURFER_HOME/mni/bin \
MINC_LIB_DIR=$FREESURFER_HOME/mni/lib \
MNI_DATAPATH=$FREESURFER_HOME/mni/data
ENV PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
MNI_PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
PATH=$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
Great -- thanks, @satra! Running now... Are the installation instructions (commented out) above this correct?: https://github.com/nipy/mindboggle/blob/master/install/Dockerfile.mindboggle.complete#L64
And is there anything you would change in the install_mindboggle.sh script, for those who don't wish to use Docker?: https://github.com/nipy/mindboggle/blob/master/install/install_mindboggle.sh
@binarybottle - the commented out bits should change. this new approach tar ball reflects the approach with reprozip in the freesurfer issue and is simply a minimized tar-ball for recon-all (nothing else). also in neither circumstance were we compiling freesurfer.
Error running recon-all in the Docker container:
... Iteration 1 Wed May 10 02:25:45 UTC 2017 nu_correct -clobber ./tmp.mri_nu_correct.mni.228/nu0.mnc ./tmp.mri_nu_correct.mni.228/nu1.mnc -t\ mpdir ./tmp.mri_nu_correct.mni.228/0/ -iterations 1000 -distance 50 Can't locate MNI/Startup.pm in @INC (you may need to install the MNI::Startup module) (@INC cont\ ains: /opt/freesurfer/mni/lib/perl5/5.8.5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 \ /usr/local/share/perl/5.20.2 /usr/lib/x8664-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86\ 64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /opt/freesurfer/mni/b\ in/nu_correct line 37. BEGIN failed--compilation aborted at /opt/freesurfer/mni/bin/nu_correct line 37. ERROR: nu_correct Linux 4ed98e89deee 4.9.13-moby #1 SMP Sat Mar 25 02:48:44 UTC 2017 x86_64 GNU/Linux
recon-all -s subject1 exited with ERRORS at Wed May 10 02:25:45 UTC 2017
use these variables. seems like the same as before, but this works for me.
ENV FS_OVERRIDE=0 \
OS=Linux \
FSF_OUTPUT_FORMAT=nii.gz \
FIX_VERTEX_AREA=\
FREESURFER_HOME=/opt/freesurfer
ENV MNI_DIR=$FREESURFER_HOME/mni \
SUBJECTS_DIR=/subjects
ENV PERL5LIB=$MNI_DIR/share/perl5 \
MNI_PERL5LIB=$MNI_DIR/share/perl5 \
MINC_BIN_DIR=$MNI_DIR/bin \
MINC_LIB_DIR=$MNI_DIR/lib \
MNI_DATAPATH=$MNI_DIR/data
ENV PATH=$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
the perl5 locations are different for freesurfer 6
Great! FreeSurfer is running now. If the Dockerfile is downloading a reprozipped version of FreeSurfer and of ANTs, then I shouldn't have to reprozip my docker container, should I? It doesn't sound like there will be any savings.
ants is not reprozipped for mindboggle. you shouldn't reprozip the recon process, but you should reprozip both ants and mindboggle processes. again this is for the minimal container, not the dev container.
btw, your commented ants instructions do not conform to the download you are pointing to. the git checkout tag is incorrect.
Does the commented section reflect the installation steps you used for FS?
Is the only incorrect portion of the ANTs installation the git tag? If so, what version did you use?
How would I selectively reprozip just ANTs and Mindboggle but not FS? FS would not be included in a reprozip pack, correct?
- Does the commented section reflect the installation steps you used for FS?
it doesn't. what i used for freesurfer is in this discussion: https://github.com/freesurfer/freesurfer/issues/70
- Is the only incorrect portion of the ANTs installation the git tag? If so, what version did you use?
the commented section that's in the nipype workshop: https://github.com/nipy/workshops/blob/master/170327-nipype/docker/Dockerfile.all#L43
- How would I selectively reprozip just ANTs and Mindboggle but not FS? FS would not be included in a reprozip pack, correct?
you would process the config.yml to extract only the files from your miniconda directory and ants directory. this would be similar to the process used for recon-all as described in the freesurfer issue (see 1.).
Thank you --
Install minimized (reprozip) version of FreeSurfer v6.0: https://github.com/freesurfer/freesurfer/issues/70
Install ANTS (git checkout 767f756bc0e423cd503a24c806b6578aaeb5b82f) Note: ANTs compilation takes longer than Dockerhub allows (2 hours), so a version from March 24, 2017 was compiled according to: https://github.com/nipy/workshops/blob/master/170327-nipype/docker/Dockerfile.all#L43 and is loaded from the link below.
Speaking of ANTs, the first new release after two years came out yesterday!: https://github.com/stnava/ANTs/releases
@binarybottle - ants should be updated to reflect the latest release then.
regarding reprozip - you can keep it if you want, especially given that you are not doing brainstem segmentation or hippocampal subfields but still installing the version of recon-all that includes support for them.
Would you like to compile the latest version of ANTs? Why don't we store the FS and ANTs tar-balls on osf.io instead of dropbox? How about here?: https://osf.io/xtzv3/
Re: reprozip and config.yml, I am confused. If I want to allow users of the container to do brainstem and hippo segmentation, what do I do? Would I remove the recon-all line from my reprozip command and have FS sit next to the reprozipped ANTs and mindboggle?
actually the reprozip trace command in the shell script will not work properly, it will only trace recon-all (see the freesurfer issue on how to setup multiple traces).
for ants at this point, and more generally, i would use the following project to build it: https://github.com/kaczmarj/neurodocker
i've just asked jakub to look into minimizing container builds as well.
regarding downloads, yes they can, and perhaps should, be hosted on osf. it's just easier at this point on dropbox. we can of course link osf to dropbox. for now, since this is an evolving area, i'd like to just make sure we get the components working right and then move as necessary to specific places.
@satra -- I made a pull request because neurodocker's ants.py doesn't include version 2.2.0.
I have created a new Docker container that will run FreeSurfer, ANTs, and the revised Mindboggle. Please see the new docker pull and run instructions (http://mindboggle.readthedocs.io/en/latest/#installing-mindboggle).
@binarybottle - shall we create a version of mindboggle that starts with a T1, and optional T2 for freesurfer, and runs through everything. it will take a while, but may be easier for users. it would create the outputs as:
participant_id