Skip to content

Commit 2ee9723

Browse files
authored
Merge pull request #1764 from poldracklab/docker/better-templateflow
FIX: Minor improvements for templateflow installation in Docker images
2 parents e7463fe + b6e687a commit 2ee9723

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,15 @@ RUN python -c "from matplotlib import font_manager" && \
162162
sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )
163163

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

0 commit comments

Comments
 (0)