From 6e4ec600a05ef36edbadb9a69b983062f01bb03d Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 18 Jul 2023 10:47:20 -0400 Subject: [PATCH] Add AtlasPack atlases to Docker image (#22) * Add AtlasPack atlases. * Update path. * Update Dockerfile * Update Dockerfile --- Dockerfile | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8eaa70e..24974dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,16 @@ FROM pennlinc/xcp_d:0.1.3 as build_fsl +FROM pennlinc/atlaspack:0.0.4 as atlaspack FROM ubuntu:bionic-20220531 COPY docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg +# Download atlases from AtlasPack +RUN mkdir /AtlasPack +COPY --from=atlaspack /AtlasPack/tpl-fsLR_*.dlabel.nii /AtlasPack/ +COPY --from=atlaspack /AtlasPack/tpl-MNI152NLin6Asym_*.nii.gz /AtlasPack/ +COPY --from=atlaspack /AtlasPack/atlas-4S*.tsv /AtlasPack/ +COPY --from=atlaspack /AtlasPack/*.json /AtlasPack/ + # Install basic libraries RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -120,24 +128,24 @@ ENV FSLDIR="/opt/fsl" \ # 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' \ - --exclude='freesurfer/docs' \ - --exclude='freesurfer/fsfast' \ - --exclude='freesurfer/lib/cuda' \ - --exclude='freesurfer/lib/qt' \ - --exclude='freesurfer/matlab' \ - --exclude='freesurfer/mni/share/man' \ - --exclude='freesurfer/subjects/fsaverage_sym' \ - --exclude='freesurfer/subjects/fsaverage3' \ - --exclude='freesurfer/subjects/fsaverage4' \ - --exclude='freesurfer/subjects/cvs_avg35' \ - --exclude='freesurfer/subjects/cvs_avg35_inMNI152' \ - --exclude='freesurfer/subjects/bert' \ - --exclude='freesurfer/subjects/lh.EC_average' \ - --exclude='freesurfer/subjects/rh.EC_average' \ - --exclude='freesurfer/subjects/sample-*.mgz' \ - --exclude='freesurfer/subjects/V1_average' \ - --exclude='freesurfer/trctrain' + --exclude="freesurfer/diffusion" \ + --exclude="freesurfer/docs" \ + --exclude="freesurfer/fsfast" \ + --exclude="freesurfer/lib/cuda" \ + --exclude="freesurfer/lib/qt" \ + --exclude="freesurfer/matlab" \ + --exclude="freesurfer/mni/share/man" \ + --exclude="freesurfer/subjects/fsaverage_sym" \ + --exclude="freesurfer/subjects/fsaverage3" \ + --exclude="freesurfer/subjects/fsaverage4" \ + --exclude="freesurfer/subjects/cvs_avg35" \ + --exclude="freesurfer/subjects/cvs_avg35_inMNI152" \ + --exclude="freesurfer/subjects/bert" \ + --exclude="freesurfer/subjects/lh.EC_average" \ + --exclude="freesurfer/subjects/rh.EC_average" \ + --exclude="freesurfer/subjects/sample-*.mgz" \ + --exclude="freesurfer/subjects/V1_average" \ + --exclude="freesurfer/trctrain" ENV FREESURFER_HOME="/opt/freesurfer" \ FSF_OUTPUT_FORMAT="nii.gz" @@ -188,7 +196,7 @@ ENV HOME="/home/xcp_d" # Update pip, which AFNI installs (probably) RUN pip install --no-cache-dir --upgrade pip -# Precaching fonts, set 'Agg' as default backend for matplotlib +# Precaching fonts, set "Agg" as default backend for matplotlib RUN python -c "from matplotlib import font_manager" && \ sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )