Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sMRIPrep 0.13 #376

Merged
merged 143 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
8e8eea9
RF: Split surface workflow into recon and derivative preparation
effigies Sep 30, 2022
9dfa265
MNT: Update .gitignore
effigies Sep 30, 2022
9b9a5ce
RF: Break derivatives worfklow into first and second derivatives
effigies Oct 3, 2022
fe60be3
RF: Split workflows.norm into workflows.fit.registration and workflow…
effigies Oct 11, 2022
de8e62b
RF: Use split workflows in anat_preproc_wf
effigies Oct 11, 2022
5f152d9
RF: Factor out brainmask refinement workflow
effigies Oct 18, 2022
58b8a3a
RF: Reorganize anat into fit and derivatives
effigies Nov 1, 2022
37aade1
FIX: Continue on missing fast-track items
effigies Nov 9, 2022
54bbc2e
RF: Deprecate --fast-track for --derivatives
effigies Nov 9, 2022
27a4d97
ENH: Add logging during workflow build
effigies Nov 9, 2022
5d2b755
WRAPPER: Patch in derivatives
effigies Nov 9, 2022
73eb03f
RF: Use pre-computed template warps
effigies Nov 10, 2022
5b07196
RF: Split first derivatives workflow
effigies Nov 14, 2022
890fc3e
ENH: Use ITK transforms in FreeSurfer contexts
effigies Nov 14, 2022
d47338b
FIX: Workflow connections
effigies Nov 14, 2022
7429106
RF: Drop unused predict_derivatives function
effigies Nov 14, 2022
c1f022e
RF: Skip fsnative registration if transform is found
effigies Nov 14, 2022
3123fbd
STY: Unused import
effigies Nov 14, 2022
ee28819
DOC: Add precomputed arg to workflow, remove old output
effigies Nov 15, 2022
dca427e
FIX: Add fit_wf.inputnode explicitly
effigies Nov 15, 2022
dc5eb34
MNT: Re-add workflow description
effigies Nov 16, 2022
4f6369c
Add types to workflow parameters
effigies Nov 16, 2022
e12ee79
DOC: Restore docstring for anat_fit_wf, update argument ordering
effigies Nov 16, 2022
52c7994
DOC: Update output docs, make a note of organization
effigies Nov 16, 2022
257a5c8
FIX: Drop t1w_realign_xfm from outputnodes
effigies Nov 16, 2022
ada61ac
DOC: Update anat_preproc_wf arguments and docs
effigies Nov 16, 2022
a31959d
STY: black
effigies Nov 16, 2022
cf96ab5
FIX: Un-split badly split f-string
effigies Nov 16, 2022
b4ae477
RF: Re-attach report workflow
effigies Nov 18, 2022
b1f4c5c
DOC: Fix docstring
effigies Nov 19, 2022
95f7336
DOC: Templateflow cannot be mocked if we import niworkflows.utils.spaces
effigies Nov 29, 2022
c7d9101
FIX: Guard against missing references
effigies Nov 29, 2022
8aa8e6c
Drop apply workflows for now
effigies Nov 30, 2022
653f728
Merge remote-tracking branch 'upstream/master' into rf/split_workflow
effigies Apr 11, 2023
73be00f
ENH: Clean up t2w_preproc sinking
effigies Apr 11, 2023
b401197
CI: Drop unused fs-license context
effigies Jan 18, 2023
05f9cc9
FIX: Re-add anat_preproc_wf outputs
effigies Jan 19, 2023
a5f64fc
FIX: Clearer skull strip variables
effigies Jan 19, 2023
066b531
ENH: Move anat ribbon out of primary fit workflow
effigies Apr 14, 2023
bfd418b
FIX: Disable validation on derivative dataset
effigies Apr 15, 2023
811f52f
FIX: Connect ANTs segmentation from n4-only wf
effigies Apr 16, 2023
1dcac89
Merge remote-tracking branch 'upstream/master' into rf/split_workflow
effigies Apr 16, 2023
7f66113
DOC: Add t2w arg in docstring
effigies Apr 16, 2023
b07a423
Merge remote-tracking branch 'upstream/master' into rf/split_workflow
effigies Jun 6, 2023
39f5dea
RF: Move sphere_reg_wf into surface derivatives
effigies Jun 6, 2023
a7a42e5
Merge remote-tracking branch 'upstream/master' into rf/split_workflow
effigies Jun 19, 2023
b771ae0
STY: black; adapt flake8 rules
effigies Jun 19, 2023
c8853ef
Merge remote-tracking branch 'upstream/master' into rf/split_workflow
effigies Jun 19, 2023
311328c
Merge remote-tracking branch 'upstream/master' into next
effigies Aug 25, 2023
ab82e3f
RF: Break morphometry and surface resampling into separate workflows
effigies Aug 25, 2023
4393012
FIX: Wait on save_midthickness to complete recon
effigies Aug 27, 2023
2725048
RF: Make transform optional for normalizing GIFTIs
effigies Aug 27, 2023
3e4f185
RF: Only purge VolGeom metadata for surfaces we convert --to-scanner
effigies Aug 27, 2023
9d0d4a0
RF: Split sphere_reg conversion from fsLR registration
effigies Aug 27, 2023
0ac6ec9
ENH: Add --cifti-output flag and test
effigies Aug 27, 2023
48b57cf
RF: Remove unused connection, pass density value directly
effigies Aug 27, 2023
86821b6
FIX: Retrieve "graymid", not "midthickness"
effigies Aug 27, 2023
ee9fff7
CI: Use fresh workdir cache
effigies Aug 27, 2023
bd097e8
FIX: Drop sphere_reg from default surfaces
effigies Aug 27, 2023
776a90d
RF: Rewrite surface fetcher to prefer midthickness
effigies Aug 27, 2023
42abe8d
FIX: Pass surfaces after node creation
effigies Aug 27, 2023
fb17bbe
FIX: Get this thing to work
effigies Aug 27, 2023
a54c551
DEBUG: Set some debug config
effigies Aug 27, 2023
f87d17f
RF: Pass white/pial directly to anat_ribbon_wf
effigies Aug 27, 2023
0a9a096
CI: Expect morphometry CIFTI files
effigies Aug 27, 2023
8092b24
RF: Split out surface derivative workflow
effigies Aug 27, 2023
9425caa
Update smriprep/interfaces/surf.py
effigies Aug 28, 2023
8bdd2ce
Merge pull request #360 from effigies/rf/split_surface_workflows
effigies Aug 28, 2023
d1e2090
CI: Drop Python 3.8 (for now)
effigies Aug 28, 2023
0958d89
CI: Run Github actions on PRs to next
effigies Aug 28, 2023
506df71
MNT: 3.10+
effigies Aug 28, 2023
601231e
ENH: Run pytest on CircleCI
effigies Aug 28, 2023
244f1b2
Merge pull request #364 from effigies/ci/pytest-on-circle
effigies Aug 28, 2023
e9c17e5
ENH: Add simple Python interface to generate ribbon
effigies Aug 28, 2023
85550e6
TEST: Add test for MakeRibbon interface
effigies Aug 28, 2023
751369b
TEST: Integration test with gifti_surfaces and anat_ribbon workflows
effigies Aug 28, 2023
5bd3b74
CI: Attach to the get_data workspace to have the FS_LICENSE
effigies Aug 28, 2023
df4d369
FIX: Inverted logic
effigies Aug 28, 2023
e6c972e
RF: Replace fslmaths chain with MakeRibbon
effigies Aug 28, 2023
4624038
TEST: Fix double call and skip check for fslmaths
effigies Aug 28, 2023
e9165a3
Update smriprep/interfaces/surf.py
effigies Aug 29, 2023
fb05822
Update smriprep/interfaces/surf.py
effigies Aug 29, 2023
c3f51ad
DOC: Add docstring for anat_ribbon_wf
effigies Aug 29, 2023
9a135f4
Merge pull request #363 from effigies/enh/simplify-ribbon
effigies Aug 29, 2023
92f2113
Merge remote-tracking branch 'upstream/master' into next
effigies Aug 31, 2023
fe8f7ca
Merge remote-tracking branch 'upstream/master' into next
effigies Sep 6, 2023
c807c7f
FIX: msm_sulc does not currently reside in fit
effigies Sep 6, 2023
8a6fc42
FIX: Update msm_sulc connections
effigies Sep 6, 2023
b065045
Merge remote-tracking branch 'upstream/master' into next
effigies Sep 6, 2023
f6b842f
ENH: Save msm registration sphere as desc-msm_sphere.surf.gii (#365)
effigies Sep 7, 2023
e59f912
ENH: Update iospec to retrieve surfaces
effigies Sep 28, 2023
70a94da
ENH: Tag log entries with ANAT to separate from other workflows
effigies Sep 28, 2023
3a0f20d
ENH: Add msmsulc to fit workflow
effigies Sep 28, 2023
4e69c3b
ENH: Add surface outputs to fit outputnode
effigies Sep 29, 2023
fcd3b70
RF: Remove fit derivatives from secondary workflow
effigies Sep 29, 2023
fe7332b
FIX: Update outputnode spec, restore anat_ribbon
effigies Sep 29, 2023
53cb30c
RF: Move anat_ribbon into fit workflow for efficiency
effigies Sep 29, 2023
71aa027
FIX: Drop unused std_xfms and get_outputnode_spec()
effigies Sep 29, 2023
7dba95b
DOC: Fix workflow graph creation
effigies Sep 29, 2023
948b989
FIX: Various connections and names
effigies Sep 29, 2023
33a7593
CI: Authenticate Docker image pulls
effigies Sep 29, 2023
6730539
FIX: Update collect_derivatives call
effigies Sep 29, 2023
e3b87eb
FIX: Remove defunct collect_derivatives code
effigies Sep 29, 2023
b49ac4c
CI: Expect ribbon_mask.json
effigies Sep 29, 2023
3b5b230
RF: Switch to more targeted morphometry datasinks
effigies Oct 2, 2023
92773f5
Merge pull request #370 from effigies/enh/fit-msmsulc
effigies Oct 11, 2023
6995f33
Merge remote-tracking branch 'upstream/master' into next
effigies Oct 11, 2023
116cad9
Apply suggestions from code review
effigies Oct 14, 2023
05ae8c5
FIX: Cleanup bad commit/merge/something
effigies Nov 8, 2023
477063c
FIX: Update surfaces with fsnative2t1w_xfm
effigies Nov 9, 2023
e370a73
Merge pull request #384 from effigies/fix/transform_surfs
effigies Nov 9, 2023
cc744fb
ENH: Add interface to invert shape files
effigies Nov 8, 2023
357cb5f
FIX: Invert sulcal depth metric before passing to MSM
effigies Nov 8, 2023
ca55630
DATA: Add atlases from DCAN-HCP
effigies Nov 9, 2023
c6246bc
FIX: Use DCAN-HCP atlases for MSMSulc
effigies Nov 9, 2023
b52fd5c
MNT: Treat GIFTIs as binary for merging and running git-diff
effigies Nov 9, 2023
c238409
Merge pull request #383 from effigies/fix/msm-invert-sulc
effigies Nov 9, 2023
619b157
Merge remote-tracking branch 'upstream/master' into next
effigies Nov 10, 2023
55605ec
Merge remote-tracking branch 'upstream/master' into next
effigies Nov 10, 2023
cfc0592
FIX: Missing JSON brace
effigies Nov 13, 2023
c7e9c1d
MNT: Refine pre-commit exclusions
effigies Nov 13, 2023
b5e8663
STY: Apply pre-commit
effigies Nov 13, 2023
43eed0e
ENH: Annotate mris_expand with thread usage
effigies Nov 15, 2023
899f2f4
Update smriprep/interfaces/freesurfer.py
effigies Nov 16, 2023
de41f41
MNT: Remove AFNI from smriprep docker container
effigies Nov 17, 2023
1c00cee
Merge pull request #387 from effigies/docker/drop-afni
effigies Nov 18, 2023
6ce2121
Merge pull request #386 from effigies/enh/multithread-mrisexpand
effigies Nov 18, 2023
dfc26ff
RF: Generalize InvertShape to MetricMath
effigies Nov 19, 2023
76edb42
RF: Move InvertSulc to MetricMath, update imports
effigies Nov 19, 2023
58276c0
ENH: Add workflow to convert HCP-style morphometry GIFTIs
effigies Nov 19, 2023
d9f1bff
ENH: Add workflow to resample GIFTIs to fsLR and generate CIFTIs
effigies Nov 19, 2023
22fd48d
RF: Add template-space datasink workflow, iterate in main workflow
effigies Nov 19, 2023
36029c0
RF: Add CIFTI morphometrics datasink workflow
effigies Nov 19, 2023
808889b
FIX: std2anat -> anat2std_xfm in ds_std_volumes_wf connection
effigies Nov 19, 2023
7c5802f
FIX: Only create CIFTI workflows if cifti_output is set
effigies Nov 19, 2023
373c8ed
DOC: Checkpoint SpatialReferences in docstring workflows
effigies Nov 19, 2023
25a9769
DOC: Add omp_nthreads to init_morph_grayords_wf() docstring
effigies Nov 19, 2023
5edd05f
FIX: hcp_morphometrics_wf connection
effigies Nov 19, 2023
a08d9cf
RF: Separate midthickness resampling from morphometry resampling
effigies Nov 19, 2023
afa5620
ENH: Reconnect datasinks
effigies Nov 19, 2023
0bf46d1
FIX: Fetch MSM registration from correct buffer
effigies Nov 19, 2023
3c2edb7
Merge pull request #388 from effigies/rf/template-resampling-workflows
effigies Nov 19, 2023
d7bda97
Apply suggestions from code review
effigies Nov 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 36 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ _machine_defaults: &machine_defaults
_python_defaults: &python_defaults
docker:
- image: cimg/python:3.10.9
auth:
username: $DOCKER_USER
password: $DOCKER_PAT
working_directory: /tmp/src/smriprep

_docker_auth: &docker_auth
Expand Down Expand Up @@ -43,6 +46,9 @@ _pull_from_registry: &pull_from_registry
docs_deploy: &docs
docker:
- image: node:8.10.0
auth:
username: $DOCKER_USER
password: $DOCKER_PAT
working_directory: /tmp/gh-pages
steps:
- run:
Expand Down Expand Up @@ -282,8 +288,10 @@ jobs:
paths:
- /home/circleci/.local

test_wrapper:
test:
<<: *machine_defaults
environment:
- FS_LICENSE: /tmp/fslicense/license.txt
steps:
- attach_workspace:
at: /tmp
Expand Down Expand Up @@ -323,6 +331,24 @@ jobs:
which smriprep-docker
smriprep-docker -i nipreps/smriprep:latest --help
smriprep-docker -i nipreps/smriprep:latest --version
- restore_cache:
keys:
- testdata-v2-{{ .Branch }}-{{ epoch }}
- testdata-v2-{{ .Branch }}
- testdata-v2-
- restore_cache:
keys:
- templateflow-v1-{{ .Branch }}-{{ epoch }}
- templateflow-v1-{{ .Branch }}
- templateflow-v1-
- run:
name: Run Pytest
no_output_timeout: 2h
command: |
bash /tmp/src/smriprep/.circleci/pytest.sh
- codecov/upload:
file: /tmp/data/pytest_cov.xml
flags: pytest

test_deploy_pypi:
<<: *python_defaults
Expand Down Expand Up @@ -414,9 +440,10 @@ jobs:
- run: *pull_from_registry
- restore_cache:
keys:
- ds005-anat-v9-{{ .Branch }}-{{ epoch }}
- ds005-anat-v9-{{ .Branch }}
- ds005-anat-v9-master
- ds005-anat-v0-{{ .Branch }}-{{ epoch }}
- ds005-anat-v0-{{ .Branch }}
- ds005-anat-v0-master
- ds005-anat-v0-next
effigies marked this conversation as resolved.
Show resolved Hide resolved
- restore_cache:
keys:
- testdata-v2-{{ .Branch }}-{{ epoch }}
Expand Down Expand Up @@ -470,7 +497,7 @@ jobs:
rm -rf /tmp/ds005/work/reportlets
rm -rf /tmp/ds005/work/smriprep_wf/fsdir_run_*/
- save_cache:
key: ds005-anat-v9-{{ .Branch }}-{{ epoch }}
key: ds005-anat-v0-{{ .Branch }}-{{ epoch }}
paths:
- /tmp/ds005/work

Expand Down Expand Up @@ -772,8 +799,6 @@ workflows:
only: /.*/

- get_data:
context:
- fs-license
filters:
branches:
ignore:
Expand All @@ -793,10 +818,11 @@ workflows:
tags:
only: /.*/

- test_wrapper:
- test:
context:
- nipreps-common
requires:
- get_data
- build
filters:
branches:
Expand Down Expand Up @@ -852,7 +878,7 @@ workflows:
- build_docs
- ds005
- ds054
- test_wrapper
- test
filters:
branches:
only: /master/
Expand All @@ -865,7 +891,7 @@ workflows:
- ds005
- ds054
- test_deploy_pypi
- test_wrapper
- test
filters:
branches:
ignore: /.*/
Expand Down
11 changes: 11 additions & 0 deletions .circleci/ds005_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ smriprep/sub-01/anat/sub-01_desc-brain_mask.json
smriprep/sub-01/anat/sub-01_desc-brain_mask.nii.gz
smriprep/sub-01/anat/sub-01_desc-preproc_T1w.json
smriprep/sub-01/anat/sub-01_desc-preproc_T1w.nii.gz
smriprep/sub-01/anat/sub-01_desc-ribbon_mask.json
smriprep/sub-01/anat/sub-01_desc-ribbon_mask.nii.gz
smriprep/sub-01/anat/sub-01_dseg.nii.gz
smriprep/sub-01/anat/sub-01_from-fsnative_to-T1w_mode-image_xfm.txt
Expand All @@ -25,7 +26,9 @@ smriprep/sub-01/anat/sub-01_hemi-L_desc-reg_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_inflated.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_midthickness.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_pial.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_space-fsLR_desc-msmsulc_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_space-fsLR_desc-reg_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-L_sulc.shape.gii
smriprep/sub-01/anat/sub-01_hemi-L_thickness.shape.gii
smriprep/sub-01/anat/sub-01_hemi-L_white.surf.gii
Expand All @@ -34,12 +37,20 @@ smriprep/sub-01/anat/sub-01_hemi-R_desc-reg_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_inflated.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_midthickness.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_pial.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_space-fsLR_desc-msmsulc_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_space-fsLR_desc-reg_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_sphere.surf.gii
smriprep/sub-01/anat/sub-01_hemi-R_sulc.shape.gii
smriprep/sub-01/anat/sub-01_hemi-R_thickness.shape.gii
smriprep/sub-01/anat/sub-01_hemi-R_white.surf.gii
smriprep/sub-01/anat/sub-01_label-CSF_probseg.nii.gz
smriprep/sub-01/anat/sub-01_label-GM_probseg.nii.gz
smriprep/sub-01/anat/sub-01_label-WM_probseg.nii.gz
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_curv.dscalar.nii
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_curv.json
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_sulc.dscalar.nii
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_sulc.json
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_thickness.dscalar.nii
smriprep/sub-01/anat/sub-01_space-fsLR_den-91k_thickness.json
smriprep/sub-01.html
/tmp/ds005/derivatives
1 change: 1 addition & 0 deletions .circleci/ds005_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ docker run -it -e FMRIPREP_DEV=1 -u $(id -u) \
--ncpus 2 --omp-nthreads 2 -vv \
--fs-license-file /tmp/fslicense/license.txt \
--fs-subjects-dir /tmp/ds005/freesurfer \
--cifti-output \
${@:1}
2 changes: 1 addition & 1 deletion .circleci/nipype.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[execution]
stop_on_first_crash = true
poll_sleep_duration = 0.01
hash_method = content
hash_method = content
13 changes: 13 additions & 0 deletions .circleci/pytest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
docker run --rm -it \
-v /tmp/data:/tmp/data:rw \
-v /tmp/fslicense:/tmp/fslicense:ro \
-v /tmp/templateflow:/home/smriprep/.cache/templateflow \
-v /tmp/src/smriprep/docker/multiproc.coveragerc:/tmp/multiproc.coveragerc:ro \
-v /tmp/src/smriprep/.circleci/nipype.cfg:/home/smriprep/.nipype/nipype.cfg \
-e FS_LICENSE=/tmp/fslicense/license.txt \
--entrypoint=pytest \
nipreps/smriprep:latest \
-v --doctest-modules --pyargs smriprep \
--cov smriprep --cov-report=xml:/tmp/data/pytest_cov.xml \
${@:1}
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ '*' ]
tags: [ '*' ]
pull_request:
branches: [ master, 'maint/*' ]
branches: [ master, 'maint/*', 'next' ]
schedule:
- cron: '0 0 * * *'

Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.10", "3.11"]
install: [repo]
include:
- python-version: "3.11"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto-generated by .maint/make_gitignore on Fri May 19 03:22:33 PM EDT 2023
# Auto-generated by .maint/make_gitignore on Wed Nov 8 04:05:04 PM EST 2023
# setuptools_scm
_version.py

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
exclude: ".*/data/.*"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: .gitignore
exclude: '.gitignore|.*\.gii$'
- id: end-of-file-fixer
exclude: 'data/itkIdentityTransform.txt|\.svg$'
- id: check-yaml
- id: check-added-large-files
- id: check-toml
Expand Down
66 changes: 4 additions & 62 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,6 @@ COPY docker/files/freesurfer7.3.2-exclude.txt /usr/local/etc/freesurfer7.3.2-exc
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.2/freesurfer-linux-ubuntu22_amd64-7.3.2.tar.gz \
| tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.3.2-exclude.txt

# AFNI
FROM downloader as afni
# Bump the date to current to update AFNI
RUN echo "2023.04.04"
RUN mkdir -p /opt/afni-latest \
&& curl -fsSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
| tar -xz -C /opt/afni-latest --strip-components 1 \
--exclude "linux_openmp_64/*.gz" \
--exclude "linux_openmp_64/funstuff" \
--exclude "linux_openmp_64/shiny" \
--exclude "linux_openmp_64/afnipy" \
--exclude "linux_openmp_64/lib/RetroTS" \
--exclude "linux_openmp_64/lib_RetroTS" \
--exclude "linux_openmp_64/meica.libs" \
# Keep only what we use
&& find /opt/afni-latest -type f -not \( \
-name "3dTshift" -or \
-name "3dUnifize" -or \
-name "3dAutomask" -or \
-name "3dvolreg" \) -delete

# Connectome Workbench 1.5.0
FROM downloader as workbench
RUN mkdir /opt/workbench && \
Expand Down Expand Up @@ -115,56 +94,24 @@ ENV DEBIAN_FRONTEND="noninteractive" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"

# Some baseline tools; bc is needed for FreeSurfer, so don't drop it
# Some baseline tools
# bc is needed for FreeSurfer
# libglu1-mesa is needed for Connectome Workbench
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bc \
ca-certificates \
curl \
git \
gnupg \
libglu1-mesa \
lsb-release \
netbase \
xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Configure PPAs for libpng12 and libxp6
RUN GNUPGHOME=/tmp gpg --keyserver hkps://keyserver.ubuntu.com --no-default-keyring --keyring /usr/share/keyrings/linuxuprising.gpg --recv 0xEA8CACC073C3DB2A \
&& GNUPGHOME=/tmp gpg --keyserver hkps://keyserver.ubuntu.com --no-default-keyring --keyring /usr/share/keyrings/zeehio.gpg --recv 0xA1301338A3A48C4A \
&& echo "deb [signed-by=/usr/share/keyrings/linuxuprising.gpg] https://ppa.launchpadcontent.net/linuxuprising/libpng12/ubuntu jammy main" > /etc/apt/sources.list.d/linuxuprising.list \
&& echo "deb [signed-by=/usr/share/keyrings/zeehio.gpg] https://ppa.launchpadcontent.net/zeehio/libxp/ubuntu jammy main" > /etc/apt/sources.list.d/zeehio.list

# Dependencies for AFNI; requires a discontinued multiarch-support package from bionic (18.04)
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ed \
gsl-bin \
libglib2.0-0 \
libglu1-mesa-dev \
libglw1-mesa \
libgomp1 \
libjpeg62 \
libpng12-0 \
libxm4 \
libxp6 \
netpbm \
tcsh \
xfonts-base \
xvfb \
&& curl -sSL --retry 5 -o /tmp/multiarch.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.5_amd64.deb \
&& dpkg -i /tmp/multiarch.deb \
&& rm /tmp/multiarch.deb \
&& apt-get install -f \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& gsl2_path="$(find / -name 'libgsl.so.19' || printf '')" \
&& if [ -n "$gsl2_path" ]; then \
ln -sfv "$gsl2_path" "$(dirname $gsl2_path)/libgsl.so.0"; \
fi \
&& ldconfig

# Install files from stages
COPY --from=freesurfer /opt/freesurfer /opt/freesurfer
COPY --from=afni /opt/afni-latest /opt/afni-latest
COPY --from=workbench /opt/workbench /opt/workbench

# Simulate SetUpFreeSurfer.sh
Expand All @@ -184,11 +131,6 @@ ENV PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
MNI_PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \
PATH="$FREESURFER_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH"

# AFNI config
ENV PATH="/opt/afni-latest:$PATH" \
AFNI_IMSAVE_WARNINGS="NO" \
AFNI_PLUGINPATH="/opt/afni-latest"

# Workbench config
ENV PATH="/opt/workbench/bin_linux64:$PATH" \
LD_LIBRARY_PATH="/opt/workbench/lib_linux64:$LD_LIBRARY_PATH"
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ docker:
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=`python setup.py --version` .

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ sMRIPrep: Structural MRI PREProcessing pipeline

.. image:: https://circleci.com/gh/nipreps/smriprep/tree/master.svg?style=shield
:target: https://circleci.com/gh/nipreps/smriprep/tree/master

.. image:: https://codecov.io/gh/nipreps/smriprep/branch/master/graph/badge.svg
:target: https://codecov.io/gh/nipreps/smriprep
:alt: Coverage report

.. image:: https://img.shields.io/pypi/v/smriprep.svg
:target: https://pypi.python.org/pypi/smriprep/
:alt: Latest Version

.. image:: https://img.shields.io/badge/doi-10.1038%2Fs41592--018--0235--4-blue.svg
:target: https://doi.org/10.1038/s41592-018-0235-4
:alt: Published in Nature Methods
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/alabaster.css
Original file line number Diff line number Diff line change
Expand Up @@ -698,4 +698,4 @@ nav#breadcrumbs li+li:before {
div.related {
display: none;
}
}
}
2 changes: 1 addition & 1 deletion docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -673,4 +673,4 @@ div.math:hover a.headerlink {
#top-link {
display: none;
}
}
}
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ var DOCUMENTATION_OPTIONS = {
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
};
};
4 changes: 1 addition & 3 deletions docs/_static/language_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];


/* Non-minified version JS is _stemmer.js if file is provided */
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
Expand Down Expand Up @@ -293,5 +293,3 @@ function splitQuery(query) {
}
return result;
}


2 changes: 1 addition & 1 deletion docs/_static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@
.highlight .vg { color: #000000 } /* Name.Variable.Global */
.highlight .vi { color: #000000 } /* Name.Variable.Instance */
.highlight .vm { color: #000000 } /* Name.Variable.Magic */
.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
1 change: 0 additions & 1 deletion docs/_templates/apidoc/module.rst_t
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}

Loading
Loading