Skip to content

Commit

Permalink
Merge pull request #1 from khanlab/nomatlab
Browse files Browse the repository at this point in the history
no matlab, add greedy
  • Loading branch information
akhanf authored May 22, 2021
2 parents 09d1a64 + 894d2ac commit 314b515
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ MAINTAINER alik@robarts.ca

#dependencies for hippocampal autotop
# note: this installs minified versions of fsl and ants to save space..
# note 2: niftynet and snakemake/snakebids are installed in two separate conda environments

ENV PATH /opt/conda/bin:$PATH
#needed to create /usr/share/man/man1 folder to avoid error when installing jre
#python dependencies

#install linux deps
RUN apt-get update && mkdir -p /usr/share/man/man1 && apt-get install -y curl tree unzip bc default-jre libgomp1 cmake cmake-curses-gui libpng-dev zlib1g-dev build-essential wget bzip2 ca-certificates gnupg2 squashfs-tools git graphviz-dev

#install niftyreg
RUN mkdir -p /opt/niftyreg-1.3.9/src && \
RUN apt-get update && mkdir -p /usr/share/man/man1 && apt-get install -y curl tree unzip bc default-jre libgomp1 cmake cmake-curses-gui libpng-dev zlib1g-dev build-essential wget bzip2 ca-certificates gnupg2 squashfs-tools git graphviz-dev && \
mkdir -p /opt/niftyreg-1.3.9/src && \
echo "Downloading http://sourceforge.net/projects/niftyreg/files/nifty_reg-${NIFTY_VER}/nifty_reg-${NIFTY_VER}.tar.gz/download" && \
curl -L http://sourceforge.net/projects/niftyreg/files/nifty_reg-1.3.9/nifty_reg-1.3.9.tar.gz/download \
| tar xz -C /opt/niftyreg-1.3.9/src --strip-components 1 && \
Expand All @@ -25,45 +17,27 @@ cmake /opt/niftyreg-1.3.9/src \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/niftyreg-1.3.9 && \
make && \
make install && rm -rf /opt/niftyreg-1.3.9/src
ENV LD_LIBRARY_PATH /opt/niftyreg-1.3.9/lib:$LD_LIBRARY_PATH
ENV PATH /opt/niftyreg-1.3.9/bin:$PATH

#install workbench
RUN mkdir -p /opt && cd /opt && wget -q https://www.humanconnectome.org/storage/app/media/workbench/workbench-linux64-v1.5.0.zip && unzip workbench-linux64-v1.5.0.zip && rm workbench-linux64-v1.5.0.zip && cd /
ENV PATH "/opt/workbench/bin_linux64:$PATH"
ENV LD_LIBRARY_PATH "/opt/workbench/libs_linux64:/opt/workbench/libs_linux64_software_opengl:$LD_LIBRARY_PATH"


#install ants
#we only need antsRegistration N4BiasFieldCorrection ComposeMultiTransform and antsApplyTransforms , can remove everything else
RUN mkdir -p /opt/ants-2.3.1 && curl -fsSL --retry 5 https://dl.dropbox.com/s/1xfhydsf4t4qoxg/ants-Linux-centos6_x86_64-v2.3.1.tar.gz \
make install && rm -rf /opt/niftyreg-1.3.9/src && \
mkdir -p /opt && cd /opt && wget -q https://www.humanconnectome.org/storage/app/media/workbench/workbench-linux64-v1.5.0.zip && unzip workbench-linux64-v1.5.0.zip && rm workbench-linux64-v1.5.0.zip && cd / && \
mkdir -p /opt/ants-2.3.1 && curl -fsSL --retry 5 https://dl.dropbox.com/s/1xfhydsf4t4qoxg/ants-Linux-centos6_x86_64-v2.3.1.tar.gz \
| tar -xz -C /opt/ants-2.3.1 --strip-components 1 && \
mkdir /opt/ants-2.3.1-minify && for bin in antsRegistration antsApplyTransforms N4BiasFieldCorrection ComposeMultiTransform; do mv /opt/ants-2.3.1/${bin} /opt/ants-2.3.1-minify; done && \
rm -rf /opt/ants-2.3.1
ENV PATH "/opt/ants-2.3.1-minify:$PATH"

#install fsl
#we only need {flirt,fslmaths,fslreorient2std,fslroi,fslstats} from fsl, can remove everything else from bin
# we also remove {data,extras,lib,src,doc} to save space
RUN mkdir -p /opt/fsl-5.0.11 && curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.11-centos6_64.tar.gz \
rm -rf /opt/ants-2.3.1 && \
mkdir -p /opt/fsl-5.0.11 && curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.11-centos6_64.tar.gz \
| tar -xz -C /opt/fsl-5.0.11 --strip-components 1 && \
mkdir /opt/fsl-5.0.11/bin-minify && for bin in flirt fslmaths fslreorient2std fslroi fslstats; do mv /opt/fsl-5.0.11/bin/${bin} /opt/fsl-5.0.11/bin-minify; done && \
rm -rf /opt/fsl-5.0.11/bin && rm -rf /opt/fsl-5.0.11/data /opt/fsl-5.0.11/extras /opt/fsl-5.0.11/lib /opt/fsl-5.0.11/src /opt/fsl-5.0.11/doc
rm -rf /opt/fsl-5.0.11/bin && rm -rf /opt/fsl-5.0.11/data /opt/fsl-5.0.11/extras /opt/fsl-5.0.11/lib /opt/fsl-5.0.11/src /opt/fsl-5.0.11/doc && \
wget -O itksnap.tar.gz 'https://sourceforge.net/projects/itk-snap/files/itk-snap/Nightly/itksnap-nightly-master-Linux-gcc64-qt4.tar.gz/download' \
\
&& tar -zxf itksnap.tar.gz -C /opt/ \
&& mv /opt/itksnap-*/ /opt/itksnap/ \
&& rm itksnap.tar.gz

ENV LD_LIBRARY_PATH=/opt/itksnap/lib/:/opt/niftyreg-1.3.9/lib:/opt/workbench/libs_linux64:/opt/workbench/libs_linux64_software_opengl:${LD_LIBRARY_PATH}
ENV PATH /opt/conda/bin:/opt/itksnap/bin/:/opt/niftyreg-1.3.9/bin:/opt/workbench/bin_linux64:/opt/ants-2.3.1-minify:/opt/fsl-5.0.11/bin-minify:$PATH

ENV FSLDIR "/opt/fsl-5.0.11"
ENV PATH "/opt/fsl-5.0.11/bin-minify:$PATH"
ENV FSLOUTPUTTYPE NIFTI_GZ
ENV FSLMULTIFILEQUIT TRUE

#install c3d
RUN mkdir -p /opt/c3d && curl -s -L --retry 6 https://www.dropbox.com/s/bkw5mfp8r4mczsx/c3d-1.1.0-Linux-gcc64.tar.gz | tar zx -C /opt/c3d --strip-components=1
ENV PATH "/opt/c3d/bin:$PATH"


#install mcr
RUN mkdir -p /opt/mcr-install && curl -L --retry 5 https://ssd.mathworks.com/supportfiles/downloads/R2019b/Release/5/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019b_Update_5_glnxa64.zip > /opt/mcr-install/install.zip && \
unzip /opt/mcr-install/install.zip -d /opt/mcr-install && \
/opt/mcr-install/install -mode silent -agreeToLicense yes -destinationFolder /opt/mcr && \
rm -rf /opt/mcr-install


0 comments on commit 314b515

Please sign in to comment.