Skip to content

Commit

Permalink
Merge origin/develop into surface_derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
e-kenneally committed Sep 26, 2023
2 parents 0fe2d1b + a892846 commit 4cc0fd2
Show file tree
Hide file tree
Showing 134 changed files with 3,323 additions and 2,137 deletions.
1 change: 1 addition & 0 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ workflows:
variant: fMRIPrep-LTS
- pytest-docker:
name: "Test lite variant in Docker"
variant: lite
# - pytest-singularity:
# name: "Test in Singularity"
# - pytest-singularity:
Expand Down
60 changes: 0 additions & 60 deletions .github/Dockerfiles/AFNI.23.0.07-bionic.Dockerfile

This file was deleted.

162 changes: 162 additions & 0 deletions .github/Dockerfiles/AFNI.23.1.10-jammy.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Copyright (C) 2023 C-PAC Developers

# This file is part of C-PAC.

# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.

# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/fsl:6.0.6.5-jammy as FSL
FROM ghcr.io/fcp-indi/c-pac/ubuntu:jammy-non-free as AFNI
USER root
ENV AFNI_VERSION="23.1.10"
# To use the same Python environment to share common libraries
COPY --from=FSL /usr/share/fsl/6.0 /usr/share/fsl/6.0
ENV FSLDIR=/usr/share/fsl/6.0 \
PATH=/usr/share/fsl/6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LD_LIBRARY_PATH=/usr/share/fsl/6.0/lib:$LD_LIBRARY_PATH

# install AFNI
COPY dev/docker_data/required_afni_pkgs.txt /opt/required_afni_pkgs.txt
COPY dev/docker_data/checksum/AFNI.23.1.10.sha384 /tmp/AFNI.23.1.10.sha384
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
bc \
bzip2 \
cmake \
curl \
dh-autoreconf \
eog \
evince \
firefox \
gedit \
git \
gnome-terminal \
gnome-tweaks \
gnupg \
gsl-bin \
libcanberra-gtk-module \
libcurl4-openssl-dev \
libexpat1-dev \
libgdal-dev \
libgfortran-11-dev \
libgiftiio-dev \
libgl1-mesa-dri \
libglu1-mesa \
libglu1-mesa-dev \
libglw1-mesa \
libglw1-mesa-dev \
libgomp1 \
libgsl-dev \
libjpeg-progs \
libjpeg62 \
libmotif-dev \
libnode-dev \
libopenblas-dev \
libssl-dev \
libtool \
libudunits2-dev \
libx11-dev \
libxext-dev \
libxft-dev \
libxft2 \
libxi-dev \
libxm4 \
libxml2 \
libxml2-dev \
libxmu-dev \
libxmu-headers \
libxpm-dev \
libxslt1-dev \
m4 \
mesa-common-dev \
mesa-utils \
nautilus \
netpbm \
ninja-build \
openssh-client \
pkg-config \
r-base-dev \
rsync \
software-properties-common \
tcsh \
unzip \
vim \
wget \
x11proto-xext-dev \
xauth \
xfonts-100dpi \
xfonts-base \
xterm \
xutils-dev \
xvfb \
zlib1g-dev \
&& curl -LOJ https://github.com/afni/afni/archive/AFNI_${AFNI_VERSION}.tar.gz \
&& sha384sum --check /tmp/AFNI.23.1.10.sha384 \
&& ln -s /usr/lib/x86_64-linux-gnu/libgsl.so.27 /usr/lib/x86_64-linux-gnu/libgsl.so.19 \
&& mkdir /opt/afni \
&& tar -xvf afni-AFNI_${AFNI_VERSION}.tar.gz -C /opt/afni --strip-components 1 \
&& rm -rf afni-AFNI_${AFNI_VERSION}.tar.gz \
# Fix GLwDrawA per https://github.com/afni/afni/blob/AFNI_23.1.10/src/other_builds/OS_notes.linux_fedora_25_64.txt
&& cd /usr/include/GL \
&& mv GLwDrawA.h GLwDrawA.h.orig \
&& sed 's/GLAPI WidgetClass/extern GLAPI WidgetClass/' GLwDrawA.h.orig > GLwDrawA.h \
&& cd /opt/afni/src \
&& sed '/^INSTALLDIR =/c INSTALLDIR = /opt/afni' other_builds/Makefile.linux_ubuntu_22_64 > Makefile \
&& make vastness && make cleanest \
&& cd /opt/afni \
# filter down to required packages
ls > full_ls \
&& sed 's/linux_openmp_64\///g' /opt/required_afni_pkgs.txt | sort > required_ls \
&& comm -2 -3 full_ls required_ls | xargs rm -rf full_ls required_ls \
# get rid of stuff we just needed for building
&& apt-get remove -y \
bzip2 \
cmake \
curl \
dh-autoreconf \
evince \
firefox \
gedit \
git \
gnome-terminal \
gnome-tweaks \
libglw1-mesa-dev \
m4 \
ninja-build \
openssh-client \
unzip \
wget \
xterm \
&& ldconfig \
&& rm -rf /opt/afni/src

# set up AFNI
ENV PATH=/opt/afni:$PATH

ENTRYPOINT ["/bin/bash"]

# Link libraries for Singularity images
RUN ldconfig

RUN apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/*

FROM scratch
LABEL org.opencontainers.image.description "NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
AFNI 23.1.10 (Publius Helvius Pertinax) stage"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
COPY --from=AFNI /lib/x86_64-linux-gnu/ld* /lib/x86_64-linux-gnu/
COPY --from=AFNI /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
COPY --from=AFNI /lib64/ld* /lib64/
COPY --from=AFNI /opt/afni/ /opt/afni/
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
FROM ghcr.io/fcp-indi/c-pac/ubuntu:python3.10-bionic-non-free as ANTs
# Copyright (C) 2023 C-PAC Developers

# This file is part of C-PAC.

# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.

# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/ubuntu:jammy-non-free as ANTs

USER root
COPY dev/docker_data/checksum/ANTs.2.4.3.sha384 /tmp/checksum.sha384
Expand Down
10 changes: 7 additions & 3 deletions .github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ USER root
# install C-PAC
COPY dev/circleci_data/pipe-test_ci.yml /cpac_resources/pipe-test_ci.yml
COPY . /code
RUN pip install -e /code
RUN pip cache purge && pip install -e /code
# set up runscript
COPY dev/docker_data /code/docker_data
RUN rm -Rf /code/docker_data/Dockerfiles && \
RUN rm -Rf /code/docker_data/checksum && \
mv /code/docker_data/* /code && \
rm -Rf /code/docker_data && \
chmod +x /code/run.py && \
Expand All @@ -20,9 +20,13 @@ ENTRYPOINT ["/code/run-with-freesurfer.sh"]
RUN ldconfig \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/pip/* \
&& chmod 777 / \
&& chmod -R 777 /home/c-pac_user \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
ENV PYTHONUSERBASE=/home/c-pac_user/.local
ENV PATH=$PATH:/home/c-pac_user/.local/bin \
PYTHONPATH=$PYTHONPATH:$PYTHONUSERBASE/lib/python3.10/site-packages

# set user
# USER c-pac_user
26 changes: 0 additions & 26 deletions .github/Dockerfiles/C-PAC.develop-bionic.Dockerfile

This file was deleted.

10 changes: 7 additions & 3 deletions .github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ USER root
# install C-PAC & set up runscript
COPY dev/circleci_data/pipe-test_ci.yml /cpac_resources/pipe-test_ci.yml
COPY . /code
RUN pip install -e /code
RUN pip cache purge && pip install -e /code
# set up runscript
COPY dev/docker_data /code/docker_data
RUN rm -Rf /code/docker_data/Dockerfiles && \
RUN rm -Rf /code/docker_data/checksum && \
mv /code/docker_data/* /code && \
rm -Rf /code/docker_data && \
chmod +x /code/run.py && \
Expand All @@ -21,10 +21,14 @@ RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/pip/* \
&& ldconfig \
&& chmod 777 / \
&& chmod -R 777 /home/c-pac_user \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
ENV PYTHONUSERBASE=/home/c-pac_user/.local
ENV PATH=$PATH:/home/c-pac_user/.local/bin \
PYTHONPATH=$PYTHONPATH:$PYTHONUSERBASE/lib/python3.10/site-packages

# set user
# USER c-pac_user
51 changes: 51 additions & 0 deletions .github/Dockerfiles/C-PAC.develop-jammy.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2022-2023 C-PAC Developers

# This file is part of C-PAC.

# C-PAC is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.

# C-PAC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.6.dev1
LABEL org.opencontainers.image.description "Full C-PAC image"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
USER root

# install C-PAC
COPY dev/circleci_data/pipe-test_ci.yml /cpac_resources/pipe-test_ci.yml
COPY . /code
RUN pip cache purge && pip install -e /code
# set up runscript
COPY dev/docker_data /code/docker_data
RUN rm -Rf /code/docker_data/checksum && \
mv /code/docker_data/* /code && \
rm -Rf /code/docker_data && \
chmod +x /code/run.py && \
chmod +x /code/run-with-freesurfer.sh
ENTRYPOINT ["/code/run-with-freesurfer.sh"]

# link libraries & clean up
# link libraries & clean up
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/* \
&& find / -type f -print0 | sort -t/ -k2 | xargs -0 rdfind -makehardlinks true \
&& rm -rf results.txt \
&& apt-get remove rdfind -y \
&& apt-get clean \
&& apt-get autoremove -y \
&& ldconfig \
&& chmod 777 / \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
ENV PYTHONUSERBASE=/home/c-pac_user/.local
ENV PATH=$PATH:/home/c-pac_user/.local/bin \
PYTHONPATH=$PYTHONPATH:$PYTHONUSERBASE/lib/python3.10/site-packages

# set user
# USER c-pac_user
Loading

0 comments on commit 4cc0fd2

Please sign in to comment.