From 96104c15075213b4192eef5e0b494f415a79ff33 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Aug 2025 16:13:53 -0400 Subject: [PATCH 1/7] Ignore dist/ to avoid polluting Docker build --- .dockerignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +dist/ From 15714532cbb1e6d687f36569749b8a34a94327b9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Aug 2025 16:14:51 -0400 Subject: [PATCH 2/7] docker: Use uv build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 39af2c1..1d12f6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ ARG BASE_IMAGE=ubuntu:jammy-20240125 FROM ghcr.io/astral-sh/uv:python3.12-alpine AS src RUN apk add git COPY . /src -RUN uvx --from build pyproject-build --installer uv -w /src +RUN uv build --wheel /src # # Download stages From e56edee3ddad321e84a7c79afd594d9af854e70c Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Aug 2025 16:31:05 -0400 Subject: [PATCH 3/7] docker: build-essential no longer needed --- Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d12f6a..97a16b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,15 +90,9 @@ RUN apt-get update && \ # Micromamba FROM downloader AS micromamba -# Install a C compiler to build extensions when needed. -# traits<6.4 wheels are not available for Python 3.11+, but build easily. -RUN apt-get update && \ - apt-get install -y --no-install-recommends build-essential && \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - WORKDIR / # Bump the date to current to force update micromamba -RUN echo "2024.02.06" +RUN echo "2025.08.18" RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba ENV MAMBA_ROOT_PREFIX="/opt/conda" From 82e1b66789cd93f8806b9402656e7b0100db6364 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 18 Aug 2025 16:35:53 -0400 Subject: [PATCH 4/7] chore: Remove unused FSL and AFNI tools --- Dockerfile | 5 ++--- REFERENCES.md | 9 --------- env.yml | 5 ----- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97a16b0..7663b56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,10 +72,9 @@ RUN mkdir -p /opt/afni-latest \ --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 + -name "3dAutomask" \) \ + -delete # PETPVC FROM downloader AS petpvc diff --git a/REFERENCES.md b/REFERENCES.md index 726484b..5f6805f 100644 --- a/REFERENCES.md +++ b/REFERENCES.md @@ -13,27 +13,18 @@ | **FSL** | | https://doi.org/10.1016/j.neuroimage.2004.07.051 https://doi.org/10.1016/j.neuroimage.2008.10.055 https://doi.org/10.1016/j.neuroimage.2011.09.015 | FAST | https://doi.org/10.1109/42.906424 | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST | | BET | https://doi.org/10.1002/hbm.10062 | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET | -| FLIRT | https://doi.org/10.1006/nimg.2002.1132 https://doi.org/10.1016/S1361-8415(01)00036-6 | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT; https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT_BBR | -| MCFLIRT | https://doi.org/10.1006/nimg.2002.1132 | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MCFLIRT | -| SUSAN | https://doi.org/10.1023/A:1007963824710 | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/SUSAN | -| MELODIC | | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MELODIC | -| PRELUDE & FUGUE | https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE/Guide | https://nipype.readthedocs.io/en/latest/interfaces/generated/workflows.dmri/fsl.utils.html#cleanup-edge-pipeline | | **AFNI** | | https://doi.org/10.1006/cbmr.1996.0014; https://doi.org/10.1016/j.neuroimage.2011.08.056 | 3dvolreg | | https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dvolreg.html | -| 3dTshift | | https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTshift.html | | 3dUnifize | | https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dUnifize.html | | 3dAutomask | | https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAutomask.html | | **Power, et al. (2012) measures** | https://doi.org/10.1016/j.neuroimage.2011.10.018 | | | DVARS | https://arxiv.org/abs/1704.01469 https://doi.org/10.1101/125021 | https://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.algorithms.confounds.html#computedvars | | Framewise displacement | | https://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.algorithms.confounds.html#framewisedisplacement | | **Other** -| a/tCompCor | https://doi.org/10.1016/j.neuroimage.2007.04.042 | https://nipype.readthedocs.io/en/latest/api/generated/nipype.algorithms.confounds.html#nipype-algorithms-confounds-compcor | | Connectome Workbench | | https://humanconnectome.org/software/connectome-workbench -| phdiff2fmap | https://doi.org/10.1006/nimg.2001.1054 | https://fmriprep.readthedocs.io/en/stable/sdc/estimation.html#fmriprep.interfaces.fmap.phdiff2fmap | | nibabel | https://doi.org/10.5281/zenodo.60808 | https://github.com/nipy/nibabel/ | | nilearn | https://doi.org/10.3389/fninf.2014.00014 | https://github.com/nilearn/nilearn/ | | nipype | https://doi.org/10.3389/fninf.2011.00013 https://doi.org/10.5281/zenodo.581704 | https://github.com/nipy/nipype/ | -| convert3d | | https://sourceforge.net/projects/c3d/ | | **Graphics** | seaborn | https://doi.org/10.5281/zenodo.883859 | https://github.com/mwaskom/seaborn | | matplotlib 2.0.0 | https://doi.org/10.5281/zenodo.248351 | https://github.com/matplotlib/matplotlib | diff --git a/env.yml b/env.yml index b961ada..ee75e20 100644 --- a/env.yml +++ b/env.yml @@ -30,13 +30,8 @@ dependencies: # Workflow dependencies: Connectome Workbench - connectome-workbench-cli=2.0 # Workflow dependencies: FSL (versions pinned in 6.0.7.17.20250415.fe1c582e) - - fsl-bet2=2111.8 - - fsl-flirt=2111.4 - fsl-fast4=2111.3 - - fsl-fugue=2201.5 - - fsl-mcflirt=2111.0 - fsl-miscmaths=2412.4 - - fsl-topup=2203.5 - pip - pip: - -r requirements.txt From 0be540db3dd6bb0d447df5355827b5c4ca749b18 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 19 Aug 2025 08:57:20 -0400 Subject: [PATCH 5/7] docker: Install petpvc from conda-forge --- Dockerfile | 17 ----------------- env.yml | 2 ++ 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7663b56..d208467 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,12 +50,6 @@ RUN apt-get update && \ unzip && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# FreeSurfer 7.4.1 -# FROM downloader AS freesurfer -# COPY docker/files/freesurfer7.4.1-exclude.txt /usr/local/etc/freesurfer7.4.1-exclude.txt -# RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-ubuntu22_amd64-7.4.1.tar.gz \ -# | tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.4.1-exclude.txt - # AFNI FROM downloader AS afni # Bump the date to current to update AFNI @@ -76,16 +70,6 @@ RUN mkdir -p /opt/afni-latest \ -name "3dAutomask" \) \ -delete -# PETPVC -FROM downloader AS petpvc -RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates curl libinsighttoolkit5.2 && \ - rm -rf /var/lib/apt/lists/* && \ - curl -fsSL https://github.com/UCL/PETPVC/releases/download/v1.2.10/PETPVC-1.2.10-Linux.tar.gz \ - | tar -xz -C /usr/local --strip-components=1 \ - PETPVC-1.2.10/bin PETPVC-1.2.10/parc && \ - rm -rf /tmp/* /var/tmp/* - # Micromamba FROM downloader AS micromamba @@ -168,7 +152,6 @@ RUN apt-get update -qq \ # Install files from stages COPY --from=freesurfer/freesurfer:7.4.1 /usr/local/freesurfer /opt/freesurfer COPY --from=afni /opt/afni-latest /opt/afni-latest -COPY --from=petpvc /usr/local /usr/local # Simulate SetUpFreeSurfer.sh ENV OS="Linux" \ diff --git a/env.yml b/env.yml index ee75e20..368b594 100644 --- a/env.yml +++ b/env.yml @@ -29,6 +29,8 @@ dependencies: - ants=2.6 # Workflow dependencies: Connectome Workbench - connectome-workbench-cli=2.0 + # Workflow dependencies: PETPVC + - petpvc=1.2 # Workflow dependencies: FSL (versions pinned in 6.0.7.17.20250415.fe1c582e) - fsl-fast4=2111.3 - fsl-miscmaths=2412.4 From e813e0f0c9686efbce8fb392e4721dcf7f8da33a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 19 Aug 2025 09:08:20 -0400 Subject: [PATCH 6/7] chore: Upgrade requirements.txt with env.yml constraints --- requirements.txt | 199 +++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 102 deletions(-) diff --git a/requirements.txt b/requirements.txt index 27a627b..9dee9b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ # This file was autogenerated by uv via the following command: -# uv pip compile --extra=container --strip-extras pyproject.toml -o requirements.txt -p 3.12 -acres==0.3.0 +# uv pip compile --extra=container --strip-extras pyproject.toml -o requirements.txt -p 3.12 --constraint - +acres==0.5.0 # via # petprep (pyproject.toml) + # bidsschematools # nipype # nireports # niworkflows @@ -12,30 +13,29 @@ annexremote==1.6.6 # datalad # datalad-next # datalad-osf -anyio==4.8.0 +annotated-types==0.7.0 + # via pydantic +anyio==4.10.0 # via httpx apscheduler==3.11.0 # via petprep (pyproject.toml) arrow==1.3.0 # via codecarbon -attrs==25.1.0 - # via - # jsonschema - # niworkflows - # referencing +attrs==25.3.0 + # via niworkflows bids-validator==1.14.7.post0 # via pybids -bidsschematools==1.0.3 +bidsschematools==1.0.14 # via bids-validator -bokeh==3.6.3 +bokeh==3.7.3 # via tedana -boto3==1.37.6 +boto3==1.40.12 # via datalad -botocore==1.37.6 +botocore==1.40.12 # via # boto3 # s3transfer -certifi==2025.1.31 +certifi==2025.8.3 # via # httpcore # httpx @@ -45,32 +45,32 @@ cffi==1.17.1 # via cryptography chardet==5.2.0 # via datalad -charset-normalizer==3.4.1 +charset-normalizer==3.4.3 # via requests ci-info==0.3.0 # via # etelemetry # migas -click==8.1.8 +click==8.2.1 # via # bidsschematools # codecarbon # nipype # pybids # typer -codecarbon==2.8.3 +codecarbon==3.0.4 # via petprep (pyproject.toml) -contourpy==1.3.1 +contourpy==1.3.3 # via # bokeh # matplotlib -cryptography==44.0.2 +cryptography==45.0.6 # via # jwcrypto # secretstorage cycler==0.12.1 # via matplotlib -datalad==1.1.5 +datalad==1.2.1 # via # petprep (pyproject.toml) # datalad-next @@ -85,31 +85,31 @@ docopt==0.6.2 # via num2words etelemetry==0.3.1 # via nipype -fasteners==0.19 +fasteners==0.20 # via datalad fief-client==0.20.0 # via codecarbon -filelock==3.17.0 +filelock==3.19.1 # via nipype -fonttools==4.56.0 +fonttools==4.59.1 # via matplotlib -formulaic==1.1.1 +formulaic==1.2.0 # via pybids frozendict==2.4.6 # via pybids -fsspec==2025.2.0 +fsspec==2025.7.0 # via universal-pathlib -greenlet==3.1.1 +greenlet==3.2.4 # via sqlalchemy -h11==0.14.0 +h11==0.16.0 # via httpcore h5py==3.13.0 # via nitransforms -httpcore==1.0.7 +httpcore==1.0.9 # via httpx httpx==0.27.2 # via fief-client -humanize==4.12.1 +humanize==4.12.3 # via # datalad # datalad-next @@ -120,14 +120,12 @@ idna==3.10 # requests imageio==2.37.0 # via scikit-image -indexed-gzip==1.9.4 +indexed-gzip==1.10.1 # via smriprep interface-meta==1.3.0 # via formulaic iso8601==2.1.0 # via datalad -isodate==0.6.1 - # via rdflib jaraco-classes==3.4.0 # via # keyring @@ -136,7 +134,7 @@ jaraco-context==6.0.1 # via # keyring # keyrings-alt -jaraco-functools==4.1.0 +jaraco-functools==4.3.0 # via keyring jeepney==0.9.0 # via @@ -150,21 +148,17 @@ jmespath==1.0.1 # via # boto3 # botocore -joblib==1.4.2 +joblib==1.5.1 # via # nilearn # scikit-learn -jsonschema==4.23.0 - # via bidsschematools -jsonschema-specifications==2024.10.1 - # via jsonschema jwcrypto==1.5.6 # via fief-client keyring==25.6.0 # via datalad keyrings-alt==5.0.2 # via datalad -kiwisolver==1.4.8 +kiwisolver==1.4.9 # via matplotlib lazy-loader==0.4 # via scikit-image @@ -177,18 +171,18 @@ looseversion==1.3.0 # nipype # niworkflows # smriprep -lxml==5.3.1 +lxml==6.0.0 # via # nilearn - # prov + # nireports # svgutils mapca==0.0.5 # via tedana -markdown-it-py==3.0.0 +markdown-it-py==4.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.9.4 +matplotlib==3.10.5 # via # nireports # nitime @@ -200,14 +194,18 @@ mdurl==0.1.2 # via markdown-it-py migas==0.4.0 # via petprep (pyproject.toml) -more-itertools==10.6.0 +more-itertools==10.7.0 # via # datalad-next # jaraco-classes # jaraco-functools -msgpack==1.1.0 +msgpack==1.1.1 # via datalad -networkx==3.4.2 +narwhals==2.1.2 + # via + # bokeh + # formulaic +networkx==3.5 # via # nipype # prov @@ -224,23 +222,23 @@ nibabel==5.3.2 # pybids # smriprep # tedana -nilearn==0.11.1 +nilearn==0.12.0 # via # mapca # nireports # niworkflows # tedana -nipype==1.9.2 +nipype==1.10.0 # via # petprep (pyproject.toml) # nireports # niworkflows # smriprep -nireports==24.1.0 +nireports==25.2.0 # via petprep (pyproject.toml) nitime==0.11 # via petprep (pyproject.toml) -nitransforms==24.1.1 +nitransforms==25.0.1 # via # petprep (pyproject.toml) # niworkflows @@ -250,7 +248,7 @@ niworkflows==1.14.0 # smriprep num2words==0.5.14 # via pybids -numpy==1.26.4 +numpy==2.2.6 # via # petprep (pyproject.toml) # bokeh @@ -277,11 +275,11 @@ numpy==1.26.4 # tedana # tifffile # transforms3d -nvidia-ml-py==12.570.86 +nvidia-ml-py==12.575.51 # via pynvml osfclient==0.0.5 # via datalad-osf -packaging==24.2 +packaging==25.0 # via # petprep (pyproject.toml) # bokeh @@ -307,27 +305,27 @@ pandas==2.2.3 # pybids # seaborn # tedana -patool==4.0.0 +patool==4.0.1 # via datalad -pillow==11.1.0 +pillow==11.3.0 # via # bokeh # imageio # matplotlib # scikit-image -platformdirs==4.3.6 +platformdirs==4.3.8 # via datalad -prometheus-client==0.21.1 +prometheus-client==0.22.1 # via codecarbon -prompt-toolkit==3.0.50 +prompt-toolkit==3.0.51 # via questionary -prov==2.0.1 +prov==2.1.1 # via nipype psutil==7.0.0 # via # petprep (pyproject.toml) # codecarbon -puremagic==1.28 +puremagic==1.30 # via nipype py-cpuinfo==9.0.0 # via codecarbon @@ -340,13 +338,19 @@ pybids==0.19.0 # templateflow pycparser==2.22 # via cffi -pydot==3.0.4 - # via nipype -pygments==2.19.1 +pydantic==2.11.7 + # via codecarbon +pydantic-core==2.33.2 + # via pydantic +pydot==4.0.1 + # via + # nipype + # prov +pygments==2.19.2 # via rich pynvml==12.0.0 # via codecarbon -pyparsing==3.2.1 +pyparsing==3.2.3 # via # matplotlib # pydot @@ -359,9 +363,9 @@ python-dateutil==2.9.0.post0 # nipype # pandas # prov -python-gitlab==5.6.0 +python-gitlab==6.2.0 # via datalad -pytz==2025.1 +pytz==2025.2 # via pandas pyyaml==6.0.2 # via @@ -372,17 +376,11 @@ pyyaml==6.0.2 # smriprep questionary==2.1.0 # via codecarbon -rapidfuzz==3.12.2 +rapidfuzz==3.13.0 # via codecarbon -rdflib==6.3.2 - # via - # nipype - # prov -referencing==0.36.2 - # via - # jsonschema - # jsonschema-specifications -requests==2.32.3 +rdflib==7.1.4 + # via nipype +requests==2.32.5 # via # petprep (pyproject.toml) # codecarbon @@ -395,15 +393,11 @@ requests==2.32.3 # templateflow requests-toolbelt==1.0.0 # via python-gitlab -rich==13.9.4 +rich==14.1.0 # via # codecarbon # typer -rpds-py==0.23.1 - # via - # jsonschema - # referencing -s3transfer==0.11.4 +s3transfer==0.13.1 # via boto3 scikit-image==0.25.2 # via niworkflows @@ -412,7 +406,7 @@ scikit-learn==1.6.1 # mapca # nilearn # tedana -scipy==1.15.2 +scipy==1.15.3 # via # formulaic # mapca @@ -431,7 +425,7 @@ seaborn==0.13.2 # niworkflows secretstorage==3.3.3 # via keyring -sentry-sdk==2.22.0 +sentry-sdk==2.35.0 # via petprep (pyproject.toml) shellingham==1.5.4 # via typer @@ -439,24 +433,21 @@ simplejson==3.20.1 # via nipype six==1.17.0 # via - # isodate # osfclient # python-dateutil -smriprep==0.17.0 +smriprep==0.18.0 # via petprep (pyproject.toml) sniffio==1.3.1 # via # anyio # httpx -sqlalchemy==2.0.38 +sqlalchemy==2.0.43 # via pybids svgutils==0.3.4 - # via - # nireports - # niworkflows + # via niworkflows tedana==23.0.2 # via petprep (pyproject.toml) -templateflow==24.2.2 +templateflow==25.0.1 # via # petprep (pyproject.toml) # nireports @@ -464,15 +455,15 @@ templateflow==24.2.2 # smriprep termcolor==2.3.0 # via yaspin -threadpoolctl==3.5.0 +threadpoolctl==3.6.0 # via # scikit-learn # tedana -tifffile==2025.2.18 +tifffile==2025.6.11 # via scikit-image toml==0.10.2 # via petprep (pyproject.toml) -tornado==6.4.2 +tornado==6.5.2 # via bokeh tqdm==4.67.1 # via @@ -485,35 +476,39 @@ transforms3d==0.4.2 # via # petprep (pyproject.toml) # niworkflows -typer==0.15.2 +typer==0.16.1 # via codecarbon -types-python-dateutil==2.9.0.20241206 +types-python-dateutil==2.9.0.20250809 # via arrow -typing-extensions==4.12.2 +typing-extensions==4.14.1 # via # anyio # formulaic # jwcrypto # nibabel - # referencing + # pydantic + # pydantic-core # sqlalchemy # typer -tzdata==2025.1 + # typing-inspection +typing-inspection==0.4.1 + # via pydantic +tzdata==2025.2 # via pandas -tzlocal==5.3 +tzlocal==5.3.1 # via apscheduler universal-pathlib==0.2.6 # via pybids -urllib3==2.3.0 +urllib3==2.5.0 # via # botocore # requests # sentry-sdk wcwidth==0.2.13 # via prompt-toolkit -wrapt==1.17.2 +wrapt==1.17.3 # via formulaic -xyzservices==2025.1.0 +xyzservices==2025.4.0 # via bokeh yaspin==3.1.0 # via fief-client From 99544122b6caa1608bd86ba851a5072ccb59b98a Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 19 Aug 2025 15:04:52 -0400 Subject: [PATCH 7/7] env: Add fsl-avwutils for fslmerge, fslsplit --- env.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/env.yml b/env.yml index 368b594..6182d0e 100644 --- a/env.yml +++ b/env.yml @@ -33,6 +33,7 @@ dependencies: - petpvc=1.2 # Workflow dependencies: FSL (versions pinned in 6.0.7.17.20250415.fe1c582e) - fsl-fast4=2111.3 + - fsl-avwutils=2209.3 - fsl-miscmaths=2412.4 - pip - pip: