DOCKER: Cache templates after installing dependencies
@@ -146,21 +146,20 @@ ENV MKL_NUM_THREADS=1 \
RUN python -c "from matplotlib import font_manager" && \
sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" )
+# Installing dev requirements (packages that are not in pypi)
+WORKDIR /src/
+COPY requirements.txt requirements.txt
+RUN pip install --no-cache-dir -r requirements.txt && \
+ rm -rf ~/.cache/pip
+
# Precaching atlases
-RUN pip install --no-cache-dir "templateflow==0.4.0" && \
- python -c "from templateflow import api as tfapi; \
+RUN python -c "from templateflow import api as tfapi; \
tfapi.get('MNI152Lin|MNI152NLin2009cAsym|OASIS30ANTs', suffix='T1w'); \
tfapi.get('MNI152Lin|MNI152NLin2009cAsym|OASIS30ANTs', desc='brain', suffix='mask'); \
tfapi.get('OASIS30ANTs', resolution=1, desc='4', suffix='dseg'); \
tfapi.get('OASIS30ANTs|NKI', resolution=1, label='brain', suffix='probseg'); \
tfapi.get('OASIS30ANTs|NKI', resolution=1, desc='BrainCerebellumRegistration', suffix='mask'); "
-# Installing dev requirements (packages that are not in pypi)
-WORKDIR /src/
-COPY requirements.txt requirements.txt
-RUN pip install --no-cache-dir -r requirements.txt && \
- rm -rf ~/.cache/pip
-
COPY . niworkflows/
ARG VERSION=dev
# Force static versioning within container
