Skip to content

Commit

Permalink
Add AtlasPack atlases to Docker image (#22)
Browse files Browse the repository at this point in the history
* Add AtlasPack atlases.

* Update path.

* Update Dockerfile

* Update Dockerfile
  • Loading branch information
tsalo authored Jul 18, 2023
1 parent fb27c52 commit 6e4ec60
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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())" )

Expand Down

0 comments on commit 6e4ec60

Please sign in to comment.