From 8803f9cce84104b14b4212e0676b479334b0d9ea Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 16 Feb 2023 14:24:09 -0500 Subject: [PATCH] Try adding SLICER from FSL, without installing FSL (#11) * Try using qsiprep's FSL build. * Update Dockerfile * Try running build on PRs. * Update config.yml * Try using old xcp_d image for FSL. * Fix --- .circleci/config.yml | 2 ++ Dockerfile | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 295208b..a937678 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,8 @@ jobs: working_directory: /tmp/src/xcp_d_build steps: - checkout + - setup_remote_docker: + version: 19.03.13 - run: name: Build only no_output_timeout: 5h diff --git a/Dockerfile b/Dockerfile index a3053f0..b32b780 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ +FROM pennlinc/xcp_d:0.1.3 as build_fsl FROM ubuntu:bionic-20220531 COPY docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg -# Prepare environment +# Install basic libraries RUN apt-get update && \ apt-get install -y --no-install-recommends \ apt-utils \ @@ -37,12 +38,12 @@ RUN echo "Downloading C3D ..." \ ENV C3DPATH=/opt/c3d/bin \ PATH=/opt/c3d/bin:$PATH +# Set up NeuroDebian RUN curl -sSL "http://neuro.debian.net/lists/$( lsb_release -c | cut -f2 ).us-ca.full" >> /etc/apt/sources.list.d/neurodebian.sources.list && \ apt-key add /usr/local/etc/neurodebian.gpg && \ (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true) - -# Install and setting up miniconda +# Install and set up miniconda RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh && \ bash Miniconda3-py38_4.9.2-Linux-x86_64.sh -b -p /usr/local/miniconda && \ rm Miniconda3-py38_4.9.2-Linux-x86_64.sh @@ -74,6 +75,7 @@ RUN conda install -y \ conda clean -tipsy; sync && \ rm -rf ~/.conda ~/.cache/pip/*; sync +# Install AFNI, Connectome Workbench, and git-annex RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ @@ -82,6 +84,20 @@ RUN apt-get update && \ git-annex-standalone && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# Install SLICER from FSL +COPY --from=build_fsl /usr/lib/fsl/5.0/slicer /usr/lib/fsl/5.0/slicer +COPY --from=build_fsl /usr/lib/fsl/5.0/slicesdir /usr/lib/fsl/5.0/slicesdir +ENV FSLDIR="/usr/lib/fsl/5.0" \ + FSLOUTPUTTYPE="NIFTI_GZ" \ + FSLMULTIFILEQUIT="TRUE" \ + FSLLOCKDIR="" \ + FSLMACHINELIST="" \ + FSLREMOTECALL="" \ + FSLGECUDAQ="cuda.q" \ + LD_LIBRARY_PATH="/usr/lib/fsl/5.0:$LD_LIBRARY_PATH" \ + PATH="/usr/lib/fsl/5.0:$PATH" \ + FSL_DEPS="libquadmath0" + # Install FreeSurfer RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz | tar zxv --no-same-owner -C /opt \ --exclude='freesurfer/diffusion' \