Skip to content
Open
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
32 changes: 4 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
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
Expand All @@ -50,12 +50,6 @@
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
Expand All @@ -72,33 +66,16 @@
--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

# 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/*
-name "3dAutomask" \) \
-delete

# 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"
Expand Down Expand Up @@ -175,7 +152,6 @@
# 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" \
Expand All @@ -202,7 +178,7 @@
# Create a shared $HOME directory
RUN useradd -m -s /bin/bash -G users petprep
WORKDIR /home/petprep
ENV HOME="/home/petprep" \

Check warning on line 181 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-container

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}"

COPY --from=micromamba /bin/micromamba /bin/micromamba
Expand All @@ -211,7 +187,7 @@
ENV MAMBA_ROOT_PREFIX="/opt/conda"
RUN micromamba shell init -s bash && \
echo "micromamba activate petprep" >> $HOME/.bashrc
ENV PATH="/opt/conda/envs/petprep/bin:$PATH" \

Check warning on line 190 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-container

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CPATH' (did you mean $PATH?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
CPATH="/opt/conda/envs/petprep/include:${CPATH:-}" \
LD_LIBRARY_PATH="/opt/conda/envs/petprep/lib:$LD_LIBRARY_PATH"

Expand Down
9 changes: 0 additions & 9 deletions REFERENCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
8 changes: 3 additions & 5 deletions env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ 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-bet2=2111.8
- fsl-flirt=2111.4
- fsl-fast4=2111.3
- fsl-fugue=2201.5
- fsl-mcflirt=2111.0
- fsl-avwutils=2209.3
- fsl-miscmaths=2412.4
- fsl-topup=2203.5
- pip
- pip:
- -r requirements.txt
Expand Down
Loading
Loading