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
4 changes: 2 additions & 2 deletions .circleci/bcp_anat_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_curv.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_inflated.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_midthickness.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_pial.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_smoothwm.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_sulc.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_thickness.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_white.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_curv.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_inflated.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_midthickness.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_pial.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_smoothwm.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_sulc.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_thickness.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_white.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-CSF_probseg.nii.gz
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-GM_probseg.nii.gz
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-WM_probseg.nii.gz
Expand Down
4 changes: 2 additions & 2 deletions .circleci/bcp_full_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_curv.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_inflated.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_midthickness.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_pial.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_smoothwm.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_sulc.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_thickness.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-L_white.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_curv.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_inflated.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_midthickness.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_pial.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_smoothwm.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_sulc.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_thickness.shape.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_hemi-R_white.surf.gii
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-CSF_probseg.nii.gz
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-GM_probseg.nii.gz
sub-01/ses-1mo/anat/sub-01_ses-1mo_run-001_label-WM_probseg.nii.gz
Expand Down
51 changes: 6 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,45 +95,8 @@ jobs:
- run: *docker_auth
- run: *setup_docker_registry
- run:
name: Save Docker registry
command: |
if [[ ! -f /tmp/images/registry.tar.gz ]]; then
mkdir -p /tmp/images
docker save registry:2 | gzip > /tmp/images/registry.tar.gz
fi
- run:
name: Pull base image (ubuntu:focal)
command: |
set +e
docker pull localhost:5000/ubuntu
success=$?
set -e
if [[ "$success" = "0" ]]; then
echo "Pulling from local registry"
docker tag localhost:5000/ubuntu ubuntu:focal
else
echo "Pulling from Docker Hub"
docker pull ubuntu:focal
docker tag ubuntu:focal localhost:5000/ubuntu
docker push localhost:5000/ubuntu
fi
- run:
name: Pull nibabies image (nipreps/nibabies)
command: |
set +e
docker pull localhost:5000/nibabies
success=$?
set -e
if [[ "$success" = "0" ]]; then
echo "Pulled from local registry"
docker tag localhost:5000/nibabies nipreps/nibabies:dev
docker tag localhost:5000/nibabies nipreps/nibabies
else
echo "Pulling unstable from Docker Hub"
docker pull nipreps/nibabies:unstable
docker tag nipreps/nibabies:unstable nipreps/nibabies:dev
docker tag nipreps/nibabies:unstable nipreps/nibabies
fi
name: Create Docker builder
command: docker buildx create --use --name=builder --driver=docker-container
- run:
name: Clean and check images (before build)
command: |
Expand All @@ -155,15 +118,13 @@ jobs:
echo "them to your fork with ``git push origin --tags``"
fi
# Build docker image
e=1 && for i in {1..3}; do
docker build --rm \
--cache-from=nipreps/nibabies:dev \
docker buildx build --load --builder builder \
--cache-from localhost:5000/nibabies \
--cache-from nipreps/nibabies:dev \
-t nipreps/nibabies:dev \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION="${CIRCLE_TAG:-$THISVERSION}" . \
&& e=0 && break || sleep 15
done && [ "$e" -eq "0" ]
--build-arg VERSION="${CIRCLE_TAG:-$THISVERSION}" .
- run:
name: Check Docker images (after build)
command: docker images
Expand Down
25 changes: 14 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ RUN curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_6
RUN GNUPGHOME=/tmp gpg --keyserver hkps://keyserver.ubuntu.com --no-default-keyring --keyring /usr/share/keyrings/linuxuprising.gpg --recv 0xEA8CACC073C3DB2A \
&& 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

# # AFNI latest (neurodocker build)
# AFNI 2023.04.04
# 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 \
Expand All @@ -63,35 +70,31 @@ RUN apt-get update -qq \
libjpeg62 \
libpng12-0 \
libxm4 \
libxp6 \
netpbm \
tcsh \
xfonts-base \
xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& 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 \
&& curl -sSL --retry 5 -o /tmp/libxp6.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& dpkg -i /tmp/libxp6.deb \
&& rm /tmp/libxp6.deb \
&& apt-get install -f \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& 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 \
&& echo "Downloading AFNI ..." \
&& mkdir -p /opt/afni-latest \
&& ldconfig

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 \( \
Expand Down
18 changes: 0 additions & 18 deletions nibabies/utils/patches.py

This file was deleted.

2 changes: 1 addition & 1 deletion nibabies/workflows/anatomical/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ def init_infant_anat_wf(
GIFTI surfaces (gray/white boundary, midthickness, pial, inflated)
"""
from nipype.interfaces.ants.base import Info as ANTsInfo
from smriprep.workflows.norm import init_anat_norm_wf

from ...utils.misc import fix_multi_source_name
from .brain_extraction import init_infant_brain_extraction_wf
from .norm import init_anat_norm_wf
from .outputs import (
init_anat_derivatives_wf,
init_anat_reports_wf,
Expand Down
Loading