Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Pytest

on:
push:
branches: ['*']
tags: ['*']
branches: [ '*' ]
tags: [ '*' ]
pull_request:
branches: [master, 'maint/*']
branches: [ master, 'maint/*' ]

defaults:
run:
Expand All @@ -26,12 +26,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
python-version: ['3.10', '3.11', '3.12']
dependencies: ['latest', 'pre']
os: [ 'ubuntu-latest' ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
dependencies: [ 'latest', 'pre' ]
include:
- os: ubuntu-latest
python-version: '3.10'
python-version: '3.13'
dependencies: 'min'

env:
Expand Down
46 changes: 9 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@
ARG BASE_IMAGE=ubuntu:jammy-20240405

# NiBabies wheel
FROM python:slim AS src
RUN pip install build
RUN apt-get update && \
apt-get install -y --no-install-recommends git
FROM ghcr.io/astral-sh/uv:python3.12-alpine AS src
RUN apk add git
COPY . /src
RUN python -m build /src
RUN uvx --from build pyproject-build --installer uv -w /src

# Older Python to support legacy MCRIBS
FROM python:3.6.15-slim as pyenv
Expand All @@ -54,7 +52,7 @@ FROM downloader as afni
# The download link can point to newer releases
# As a safeguard, take advantage of Docker caching, and
# Bump the date to current to update AFNI
RUN echo "2023.06.09"
RUN echo "2025.06.12"
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 \
Expand All @@ -72,22 +70,6 @@ RUN mkdir -p /opt/afni-latest \
-name "3dAutomask" -or \
-name "3dvolreg" \) -delete

# ANTs 2.5.4
FROM downloader as ants
RUN mkdir -p /opt && \
curl -sSLO "https://github.com/ANTsX/ANTs/releases/download/v2.5.4/ants-2.5.4-ubuntu-22.04-X64-gcc.zip" && \
unzip ants-2.5.4-ubuntu-22.04-X64-gcc.zip -d /opt && \
rm ants-2.5.4-ubuntu-22.04-X64-gcc.zip

# Connectome Workbench 1.5.0
FROM downloader as workbench
RUN mkdir /opt/workbench && \
curl -sSLO https://www.humanconnectome.org/storage/app/media/workbench/workbench-linux64-v1.5.0.zip && \
unzip workbench-linux64-v1.5.0.zip -d /opt && \
rm workbench-linux64-v1.5.0.zip && \
rm -rf /opt/workbench/libs_linux64_software_opengl /opt/workbench/plugins_linux64 && \
strip --remove-section=.note.ABI-tag /opt/workbench/libs_linux64/libQt5Core.so.5

# Micromamba
FROM downloader as micromamba

Expand All @@ -99,15 +81,16 @@ RUN apt-get update && \

WORKDIR /
# Bump the date to current to force update micromamba
RUN echo "2024.04.25" && curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
RUN echo "2025.06.12" && curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
ENV MAMBA_ROOT_PREFIX="/opt/conda"
COPY env.yml /tmp/env.yml
COPY requirements.txt /tmp/requirements.txt
WORKDIR /tmp
RUN micromamba create -y -f /tmp/env.yml && \
micromamba clean -y -a

ENV PATH="/opt/conda/envs/nibabies/bin:$PATH"
ENV PATH="/opt/conda/envs/nibabies/bin:$PATH" \
UV_USE_IO_URING=0
RUN npm install -g svgo@^3.2.0 [email protected] && \
rm -r ~/.npm

Expand Down Expand Up @@ -180,23 +163,12 @@ RUN apt-get update -qq \
&& ldconfig

COPY --from=afni /opt/afni-latest /opt/afni-latest
COPY --from=ants /opt/ants-2.5.4 /opt/ants
COPY --from=workbench /opt/workbench /opt/workbench

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

# ANTs config
ENV ANTSPATH="/opt/ants" \
PATH="/opt/ants/bin:$PATH" \
LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"

# Workbench config
ENV PATH="/opt/workbench/bin_linux64:$PATH" \
LD_LIBRARY_PATH="/opt/workbench/lib_linux64:$LD_LIBRARY_PATH"

# Install FreeSurfer (with Infant Module)
COPY --from=nipreps/freesurfer@sha256:3b895fc732a7080374a15c4f976510f39c0c48dc76c030ab27316febd5e419ee /opt/freesurfer /opt/freesurfer
ENV FREESURFER_HOME="/opt/freesurfer"
Expand Down Expand Up @@ -278,8 +250,8 @@ ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="NiBabies" \
org.label-schema.description="NiBabies - NeuroImaging tools for babies" \
org.label-schema.name="fMRIPrep Lifespan" \
org.label-schema.description="fMRIPrep Lifespan - fMRI processing tool from birth and on" \
org.label-schema.url="https://github.com/nipreps/nibabies" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/nipreps/nibabies" \
Expand Down
80 changes: 41 additions & 39 deletions env.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
name: nibabies
channels:
- https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/
- conda-forge
# Update this ~yearly; last updated April 2023
- https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/
- conda-forge
# Update this ~yearly; last updated June 12 2025
dependencies:
- python =3.11
# Needed for svgo and bids-validator; consider moving to deno
- nodejs=20
# Intel Math Kernel Library for numpy
- mkl=2023.2.0
- mkl-service=2.4.0
# git-annex for templateflow users with DataLad superdatasets
- git-annex=*=alldep*
# Base scientific python stack; required by FSL, so pinned here
- numpy=1.26
- scipy=1.11
- matplotlib=3.8
- pandas=2.2
- h5py=3.10
# Dependencies compiled against numpy, best to stick with conda
- nitime=0.10
- scikit-image=0.22
- scikit-learn=1.4
# Utilities
- graphviz=9.0
- pandoc=3.1
# Workflow dependencies: ANTs
- ants=2.5
# Workflow dependencies: Convert3d
- convert3d=1.4
# Workflow dependencies: FSL (versions pinned in 6.0.7.7)
- fsl-bet2=2111.4
- fsl-flirt=2111.2
- fsl-fast4=2111.3
- fsl-fugue=2201.4
- fsl-mcflirt=2111.0
- fsl-miscmaths=2203.2
- fsl-topup=2203.2
- pip
- pip:
- -r requirements.txt
- python=3.13
# Needed for svgo and bids-validator; consider moving to deno
- nodejs=20
# Intel Math Kernel Library for numpy
- mkl=2024.2.2
- mkl-service=2.4.2
# git-annex for templateflow users with DataLad superdatasets
- git-annex=*=alldep*
# Base scientific python stack; required by FSL, so pinned here
- numpy=2.3
- scipy=1.15
- matplotlib=3.10
- pandas=2.3
- h5py=3.14
# Dependencies compiled against numpy, best to stick with conda
- nitime=0.11
- scikit-image=0.25
- scikit-learn=1.7
# Utilities
- graphviz=12.2
- pandoc=3.7
# Workflow dependencies: ANTs
- ants=2.6
# Workflow dependencies: Connectome Workbench
- connectome-workbench-cli=2.0
# Workflow dependencies: Convert3d
- convert3d=1.4
# 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
variables:
FSLOUTPUTTYPE: NIFTI_GZ
Loading