1- # Copyright (c) 2016, The developers of the Stanford CRN
2- # All rights reserved.
3- #
4- # Redistribution and use in source and binary forms, with or without
5- # modification, are permitted provided that the following conditions are met:
6- #
7- # * Redistributions of source code must retain the above copyright notice, this
8- # list of conditions and the following disclaimer.
9- #
10- # * Redistributions in binary form must reproduce the above copyright notice,
11- # this list of conditions and the following disclaimer in the documentation
12- # and/or other materials provided with the distribution.
13- #
14- # * Neither the name of crn_base nor the names of its
15- # contributors may be used to endorse or promote products derived from
16- # this software without specific prior written permission.
17- #
18- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22- # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24- # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25- # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26- # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27- # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28- #
29- # This Dockerfile is to be built for testing purposes inside CircleCI,
30- # not for distribution within Docker hub.
31- # For that purpose, the Dockerfile is found in build/Dockerfile.
1+ # Use Ubuntu 16.04 LTS
2+ FROM ubuntu:xenial-20161213
323
33- FROM poldracklab/neuroimaging-core:freesurfer-0.0.2
4+ # Pre-cache neurodebian key
5+ COPY docker/files/neurodebian.gpg /root/.neurodebian.gpg
346
35- # Install cwebp
7+ # Prepare environment
8+ RUN apt-get update && \
9+ apt-get install -y --no-install-recommends \
10+ curl \
11+ bzip2 \
12+ ca-certificates \
13+ xvfb \
14+ cython3 \
15+ build-essential \
16+ autoconf \
17+ libtool \
18+ pkg-config && \
19+ curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \
20+ apt-key add /root/.neurodebian.gpg && \
21+ (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true) && \
22+ apt-get update
23+
24+ # Installing freesurfer
25+ RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz | tar zxv -C /opt \
26+ --exclude='freesurfer/trctrain' \
27+ --exclude='freesurfer/subjects/fsaverage_sym' \
28+ --exclude='freesurfer/subjects/fsaverage3' \
29+ --exclude='freesurfer/subjects/fsaverage4' \
30+ --exclude='freesurfer/subjects/cvs_avg35' \
31+ --exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
32+ --exclude='freesurfer/subjects/bert' \
33+ --exclude='freesurfer/subjects/V1_average' \
34+ --exclude='freesurfer/average/mult-comp-cor' \
35+ --exclude='freesurfer/lib/cuda' \
36+ --exclude='freesurfer/lib/qt'
37+
38+ ENV FSL_DIR=/usr/share/fsl/5.0 \
39+ OS=Linux \
40+ FS_OVERRIDE=0 \
41+ FIX_VERTEX_AREA= \
42+ FSF_OUTPUT_FORMAT=nii.gz \
43+ FREESURFER_HOME=/opt/freesurfer
44+ ENV SUBJECTS_DIR=$FREESURFER_HOME/subjects \
45+ FUNCTIONALS_DIR=$FREESURFER_HOME/sessions \
46+ MNI_DIR=$FREESURFER_HOME/mni \
47+ LOCAL_DIR=$FREESURFER_HOME/local \
48+ FSFAST_HOME=$FREESURFER_HOME/fsfast \
49+ MINC_BIN_DIR=$FREESURFER_HOME/mni/bin \
50+ MINC_LIB_DIR=$FREESURFER_HOME/mni/lib \
51+ MNI_DATAPATH=$FREESURFER_HOME/mni/data \
52+ FMRI_ANALYSIS_DIR=$FREESURFER_HOME/fsfast
53+ ENV PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
54+ MNI_PERL5LIB=$MINC_LIB_DIR/perl5/5.8.5 \
55+ PATH=$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH
56+ RUN echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh
57+
58+ # Installing Neurodebian packages (FSL, AFNI, git)
59+ RUN apt-get update && \
60+ apt-get install -y --no-install-recommends \
61+ fsl-core=5.0.9-4~nd16.04+1 \
62+ fsl-mni152-templates=5.0.7-2 \
63+ afni=16.2.07~dfsg.1-5~nd16.04+1
64+
65+ ENV FSLDIR=/usr/share/fsl/5.0 \
66+ FSLOUTPUTTYPE=NIFTI_GZ \
67+ FSLMULTIFILEQUIT=TRUE \
68+ POSSUMDIR=/usr/share/fsl/5.0 \
69+ LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \
70+ FSLTCLSH=/usr/bin/tclsh \
71+ FSLWISH=/usr/bin/wish \
72+ AFNI_MODELPATH=/usr/lib/afni/models \
73+ AFNI_IMSAVE_WARNINGS=NO \
74+ AFNI_TTATLAS_DATASET=/usr/share/afni/atlases \
75+ AFNI_PLUGINPATH=/usr/lib/afni/plugins
76+ ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH
77+
78+ # Installing ANTs 2.2.0 (NeuroDocker build)
79+ ENV ANTSPATH=/usr/lib/ants
80+ RUN mkdir -p $ANTSPATH && \
81+ curl -sSL "https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz" \
82+ | tar -xzC $ANTSPATH --strip-components 1
83+ ENV PATH=$ANTSPATH:$PATH
84+
85+ # Installing WEBP tools
3686RUN curl -sSLO "http://downloads.webmproject.org/releases/webp/libwebp-0.5.2-linux-x86-64.tar.gz" && \
3787 tar -xf libwebp-0.5.2-linux-x86-64.tar.gz && cd libwebp-0.5.2-linux-x86-64/bin && \
3888 mv cwebp /usr/local/bin/ && rm -rf libwebp-0.5.2-linux-x86-64
3989
40- # Install nodejs -> svgo
90+ # Installing SVGO
4191RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
4292RUN apt-get install -y nodejs
4393RUN npm install -g svgo
@@ -73,4 +123,4 @@ RUN cd niworkflows && \
73123 python -c 'from niworkflows.data.getters import get_mni_template_ras; get_mni_template_ras()' && \
74124 python -c 'from niworkflows.data.getters import get_ds003_downsampled; get_ds003_downsampled()' && \
75125 python -c 'from niworkflows.data.getters import get_ants_oasis_template_ras; get_ants_oasis_template_ras()' && \
76- python -c 'from niworkflows.data.getters import get_mni_icbm152_nlin_asym_09c; get_mni_icbm152_nlin_asym_09c()'
126+ python -c 'from niworkflows.data.getters import get_mni_icbm152_nlin_asym_09c; get_mni_icbm152_nlin_asym_09c()'
0 commit comments