Skip to content

Commit

Permalink
Merge pull request #1764 from poldracklab/docker/better-templateflow
Browse files Browse the repository at this point in the history
FIX: Minor improvements for templateflow installation in Docker images
  • Loading branch information
oesteban authored Sep 10, 2019
2 parents e7463fe + b6e687a commit 2ee9723
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,15 @@ RUN python -c "from matplotlib import font_manager" && \
sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )

# Precaching atlases
RUN pip install --no-cache-dir "templateflow>=0.3.0,<0.4.0a0" && \
COPY setup.cfg fmriprep-setup.cfg
RUN pip install --no-cache-dir "$( grep templateflow fmriprep-setup.cfg | xargs )" && \
python -c "from templateflow import api as tfapi; \
tfapi.get('MNI152NLin6Asym', atlas=None); \
tfapi.get('MNI152NLin2009cAsym', atlas=None); \
tfapi.get('OASIS30ANTs');" && \
tfapi.get('MNI152NLin6Asym', atlas=None, resolution=[1, 2], \
desc=None, extension=['.nii', '.nii.gz']); \
tfapi.get('MNI152NLin6Asym', atlas=None, resolution=[1, 2], \
desc='brain', extension=['.nii', '.nii.gz']); \
tfapi.get('MNI152NLin2009cAsym', atlas=None, extension=['.nii', '.nii.gz']); \
tfapi.get('OASIS30ANTs', extension=['.nii', '.nii.gz']);" && \
find $HOME/.cache/templateflow -type d -exec chmod go=u {} + && \
find $HOME/.cache/templateflow -type f -exec chmod go=u {} +

Expand Down

0 comments on commit 2ee9723

Please sign in to comment.