From 2ab62e2ec24f6d2bad1754e89ba8a6eca32fa8f5 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 17 Oct 2024 09:59:34 -0400 Subject: [PATCH 1/2] Use new version of QSIRecon atlases. --- Dockerfile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index deeaff5..c3e448c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -211,26 +211,29 @@ RUN python fetch_templates.py && \ find $HOME/.cache/templateflow -type d -exec chmod go=u {} + && \ find $HOME/.cache/templateflow -type f -exec chmod go=u {} + -# Precaching AtlasPack atlases -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/tpl-MNI152NLin2009cAsym_*.nii.gz /AtlasPack/ -COPY --from=atlaspack /AtlasPack/atlas-4S*.tsv /AtlasPack/ -COPY --from=atlaspack /AtlasPack/*.json /AtlasPack/ - # Make it ok for singularity on CentOS RUN strip --remove-section=.note.ABI-tag /opt/qt512/lib/libQt5Core.so.5.12.8 \ && ldconfig +# Prepare atlases +RUN mkdir /atlas + +# Download the AtlasPack atlases +RUN mkdir /atlas/AtlasPack +COPY --from=atlaspack /AtlasPack/tpl-fsLR_*.dlabel.nii /atlas/AtlasPack/ +COPY --from=atlaspack /AtlasPack/tpl-MNI152NLin6Asym_*.nii.gz /atlas/AtlasPack/ +COPY --from=atlaspack /AtlasPack/tpl-MNI152NLin2009cAsym_*.nii.gz /atlas/AtlasPack/ +COPY --from=atlaspack /AtlasPack/atlas-4S*.tsv /atlas/AtlasPack/ +COPY --from=atlaspack /AtlasPack/*.json /atlas/AtlasPack/ +ENV QSIRECON_ATLASPACK /atlas/AtlasPack + # Download the built-in atlases -ENV QSIRECON_ATLAS /atlas/qsirecon_atlases RUN bash -c \ - 'mkdir /atlas \ - && cd /atlas \ - && wget -nv https://upenn.box.com/shared/static/40f2m6dzzd8co5jx3cxpgct3zkkwm5d3.xz \ - && tar xvfJm 40f2m6dzzd8co5jx3cxpgct3zkkwm5d3.xz \ - && rm 40f2m6dzzd8co5jx3cxpgct3zkkwm5d3.xz' + 'cd /atlas \ + && wget -nv https://upenn.box.com/shared/static/5k1tvg6soelxdhi9nvrkry6w0z49ctne.xz \ + && tar xvfJm 5k1tvg6soelxdhi9nvrkry6w0z49ctne.xz \ + && rm 5k1tvg6soelxdhi9nvrkry6w0z49ctne.xz' +ENV QSIRECON_ATLAS /atlas/qsirecon_atlases # Download the PyAFQ atlases RUN pyAFQ download From 19efa7e7ae1877fc0a69687f085f51cbea48cfa7 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 17 Oct 2024 10:02:00 -0400 Subject: [PATCH 2/2] Change location of AtlasPack. --- scripts/fix_atlaspack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fix_atlaspack.py b/scripts/fix_atlaspack.py index 68df92c..f7140ba 100644 --- a/scripts/fix_atlaspack.py +++ b/scripts/fix_atlaspack.py @@ -7,7 +7,7 @@ if __name__ == "__main__": # Where all the files are located - in_dir = "/AtlasPack" + in_dir = os.getenv("QSIRECON_ATLASPACK") with open(os.path.join(in_dir, "dataset_description.json"), "w") as fo: json.dump(