Skip to content

Commit c5d4ec7

Browse files
authored
Merge branch 'upgrade/python' into dependabot/pip/requests-2.31.0
2 parents eef4e73 + faeb2c8 commit c5d4ec7

File tree

159 files changed

+34514
-1123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+34514
-1123
lines changed

.circleci/main.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ commands:
7373
version:
7474
description: "Version of Singularity to clone"
7575
type: string
76-
default: v3.7.2
76+
default: v3.8.7
7777
steps:
7878
- install-singularity-requirements
7979
- restore_cache:
@@ -84,7 +84,7 @@ commands:
8484
command: |
8585
if [[ ! -d singularity-<< parameters.version >> ]]
8686
then
87-
git clone -b << parameters.version >> https://github.com/sylabs/singularity singularity-<< parameters.version >>
87+
git clone -b << parameters.version >> https://github.com/apptainer/singularity singularity-<< parameters.version >>
8888
fi
8989
- save_cache:
9090
key: singularity-<< parameters.version >>
@@ -94,16 +94,29 @@ commands:
9494
name: "Setting up Singularity"
9595
command: |
9696
cd singularity-<< parameters.version >>
97-
./mconfig
97+
./mconfig -p /usr/local
9898
make -C builddir
9999
sudo make -C builddir install
100100
cd ..
101101
install-singularity-requirements:
102102
steps:
103103
- run:
104104
name: "Installing Singularity requirements"
105+
# https://github.com/apptainer/apptainer/blob/release-1.1/INSTALL.md
105106
command: |
106-
sudo apt-get update && sudo apt-get install flawfinder squashfs-tools uuid-dev libuuid1 libffi-dev libssl-dev libssl1.1 libarchive-dev libgpgme11-dev libseccomp-dev -y
107+
sudo apt-get update -y && \
108+
sudo apt-get install -y \
109+
build-essential \
110+
libseccomp-dev \
111+
pkg-config \
112+
uidmap \
113+
squashfs-tools \
114+
squashfuse \
115+
fuse2fs \
116+
fuse-overlayfs \
117+
fakeroot \
118+
cryptsetup \
119+
curl wget git
107120
run-pytest-docker:
108121
steps:
109122
- create-docker-test-container:
@@ -115,17 +128,18 @@ commands:
115128
steps:
116129
- restore_cache:
117130
keys:
118-
- pip-ci-requirements-{{ checksum "dev/circleci_data/requirements.txt" }}-3.8.5
131+
- pip-ci-requirements-{{ checksum "dev/circleci_data/requirements.txt" }}-3.10.10
119132
- run:
120133
name: "Installing CI dependencies"
121134
command: |
122-
pyenv global 3.8.5
135+
yes n | pyenv install 3.10.10 || true
136+
pyenv global 3.10.10
123137
pip install --upgrade pip
124138
pip install -r dev/circleci_data/requirements.txt
125139
- save_cache:
126-
key: pip-ci-requirements-{{ checksum "dev/circleci_data/requirements.txt" }}-3.8.5
140+
key: pip-ci-requirements-{{ checksum "dev/circleci_data/requirements.txt" }}-3.10.10
127141
paths:
128-
- /opt/circleci/.pyenv/versions/3.8.5
142+
- /opt/circleci/.pyenv/versions/3.10.10
129143
set-up-variant:
130144
parameters:
131145
variant:
@@ -162,7 +176,7 @@ commands:
162176
jobs:
163177
combine-coverage:
164178
machine:
165-
image: ubuntu-2004:202010-01
179+
image: ubuntu-2004:2023.04.2
166180
steps:
167181
- checkout
168182
- restore_cache:
@@ -187,7 +201,7 @@ jobs:
187201
type: string
188202
default: ""
189203
machine:
190-
image: ubuntu-2004:202010-01
204+
image: ubuntu-2004:2023.04.2
191205
resource_class: medium
192206
steps:
193207
- checkout
@@ -209,7 +223,7 @@ jobs:
209223
type: string
210224
default: ""
211225
machine:
212-
image: ubuntu-2004:202010-01
226+
image: ubuntu-2004:2023.04.2
213227
resource_class: large
214228
steps:
215229
- checkout
@@ -231,7 +245,7 @@ jobs:
231245
type: string
232246
default: ""
233247
machine:
234-
image: ubuntu-2004:202010-01
248+
image: ubuntu-2004:2023.04.2
235249
resource_class: large
236250
steps:
237251
- checkout
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM ghcr.io/fcp-indi/c-pac/ubuntu:python3.10-bionic-non-free as AFNI
2+
USER root
3+
4+
# install AFNI
5+
COPY dev/docker_data/required_afni_pkgs.txt /opt/required_afni_pkgs.txt
6+
COPY dev/docker_data/checksum/AFNI.23.0.07.sha384 /tmp/AFNI.23.0.07.sha384
7+
RUN if [ -f /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 ]; then \
8+
ln -svf /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/x86_64-linux-gnu/libGL.so.1; \
9+
fi \
10+
&& libs_path=/usr/lib/x86_64-linux-gnu \
11+
&& if [ -f $libs_path/libgsl.so.23 ]; then \
12+
ln -svf $libs_path/libgsl.so.23 $libs_path/libgsl.so.19 \
13+
&& ln -svf $libs_path/libgsl.so.23 $libs_path/libgsl.so.0; \
14+
elif [ -f $libs_path/libgsl.so.23.0.0 ]; then \
15+
ln -svf $libs_path/libgsl.so.23.0.0 $libs_path/libgsl.so.19 \
16+
&& ln -svf $libs_path/libgsl.so.23.0.0 $libs_path/libgsl.so.0; \
17+
elif [ -f $libs_path/libgsl.so ]; then \
18+
ln -svf $libs_path/libgsl.so $libs_path/libgsl.so.0; \
19+
fi \
20+
&& LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH \
21+
&& export LD_LIBRARY_PATH \
22+
&& apt-get update && apt-get install -y libglw1-mesa-dev \
23+
&& AFNI_VERSION="23.0.07" \
24+
&& curl -LOJ https://github.com/afni/afni/archive/AFNI_${AFNI_VERSION}.tar.gz \
25+
&& sha384sum --check /tmp/AFNI.23.0.07.sha384 \
26+
&& mkdir /opt/afni \
27+
&& tar -xvf afni-AFNI_${AFNI_VERSION}.tar.gz -C /opt/afni --strip-components 1 \
28+
&& rm -rf afni-AFNI_${AFNI_VERSION}.tar.gz \
29+
&& cd /opt/afni/src \
30+
&& sed '/^INSTALLDIR =/c INSTALLDIR = /opt/afni' Makefile.linux_ubuntu_16_64 > Makefile \
31+
&& make vastness && make cleanest \
32+
&& cd /opt/afni \
33+
# filter down to required packages
34+
ls > full_ls \
35+
&& sed 's/linux_openmp_64\///g' /opt/required_afni_pkgs.txt | sort > required_ls \
36+
&& comm -2 -3 full_ls required_ls | xargs rm -rf full_ls required_ls \
37+
&& apt-get remove -y libglw1-mesa-dev \
38+
&& ldconfig
39+
40+
# set up AFNI
41+
ENV PATH=/opt/afni:$PATH
42+
43+
ENTRYPOINT ["/bin/bash"]
44+
45+
# Link libraries for Singularity images
46+
RUN ldconfig
47+
48+
RUN apt-get clean \
49+
&& apt-get autoremove -y \
50+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
51+
52+
FROM scratch
53+
LABEL org.opencontainers.image.description "NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
54+
AFNI 21.1.00 (Domitian) stage"
55+
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
56+
COPY --from=AFNI /lib/x86_64-linux-gnu/ld* /lib/x86_64-linux-gnu/
57+
COPY --from=AFNI /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
58+
COPY --from=AFNI /lib64/ld* /lib64/
59+
COPY --from=AFNI /opt/afni/ /opt/afni/
60+
COPY --from=AFNI /usr/lib/x86_64-linux-gnu/lib*so* /usr/lib/x86_64-linux-gnu/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ghcr.io/fcp-indi/c-pac/ubuntu:python3.10-bionic-non-free as ANTs
2+
3+
USER root
4+
COPY dev/docker_data/checksum/ANTs.2.4.3.sha384 /tmp/checksum.sha384
5+
RUN curl -sL https://github.com/ANTsX/ANTs/releases/download/v2.4.3/ants-2.4.3-ubuntu-18.04-X64-gcc.zip -o /tmp/ANTs.zip \
6+
&& curl -sL https://s3-eu-west-1.amazonaws.com/pfigshare-u-files/3133832/Oasis.zip -o /tmp/Oasis.zip \
7+
&& sha384sum --check /tmp/checksum.sha384 \
8+
&& unzip /tmp/ANTs.zip -d /tmp \
9+
&& mkdir /usr/lib/ants \
10+
&& mv /tmp/ants-2.4.3/* /usr/lib/ants \
11+
&& mkdir /ants_template \
12+
&& unzip /tmp/Oasis.zip -d /tmp \
13+
&& mv /tmp/MICCAI2012-Multi-Atlas-Challenge-Data /ants_template/oasis
14+
15+
# Only keep what we need
16+
FROM scratch
17+
LABEL org.opencontainers.image.description "NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
18+
ANTs 2.4.3 stage"
19+
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
20+
COPY --from=ANTs /usr/lib/ants/ /usr/lib/ants/
21+
COPY --from=ANTs /ants_template/ /ants_template/

.github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.5
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.6.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [ABCD-HCP BIDS fMRI Pipeline](https://github.com/DCAN-Labs/abcd-hcp-pipeline/blob/e480a8f99534f1b05f37bf44c64827384b69b383/Dockerfile)"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root
@@ -17,11 +17,12 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
1717
ENTRYPOINT ["/code/run-with-freesurfer.sh"]
1818

1919
# Link libraries for Singularity images
20-
RUN ldconfig
21-
22-
RUN apt-get clean && \
23-
apt-get autoremove -y && \
24-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
20+
RUN ldconfig \
21+
&& apt-get clean \
22+
&& apt-get autoremove -y \
23+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
24+
&& chmod 777 / \
25+
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
2526

2627
# set user
2728
# USER c-pac_user

.github/Dockerfiles/C-PAC.develop-bionic.Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.5
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.6.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root
@@ -17,9 +17,10 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
1717
ENTRYPOINT ["/code/run-with-freesurfer.sh"]
1818

1919
# link libraries & clean up
20-
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
21-
ldconfig && \
22-
chmod 777 $(ls / | grep -v sys | grep -v proc)
20+
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
21+
&& ldconfig \
22+
&& chmod 777 / \
23+
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
2324

2425
# set user
2526
# USER c-pac_user

.github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.5
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.6.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [fMRIPrep LTS](https://reproducibility.stanford.edu/fmriprep-lts#long-term-support-lts)"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root
@@ -17,13 +17,14 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
1717
ENTRYPOINT ["/code/run-with-freesurfer.sh"]
1818

1919
# link libraries & clean up
20-
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
21-
locale-gen && \
22-
apt-get clean && \
23-
apt-get autoremove -y && \
24-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
25-
ldconfig && \
26-
chmod 777 $(ls / | grep -v sys | grep -v proc)
20+
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
21+
&& locale-gen \
22+
&& apt-get clean \
23+
&& apt-get autoremove -y \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
25+
&& ldconfig \
26+
&& chmod 777 / \
27+
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
2728

2829
# set user
2930
# USER c-pac_user
Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
FROM ghcr.io/fcp-indi/c-pac:latest-bionic
1+
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.6.dev1
22
LABEL org.opencontainers.image.description "Full C-PAC image without FreeSurfer"
33
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
44
USER root
5+
6+
# install C-PAC
7+
COPY dev/circleci_data/pipe-test_ci.yml /cpac_resources/pipe-test_ci.yml
8+
COPY . /code
9+
RUN pip install -e /code
10+
# set up runscript
11+
COPY dev/docker_data /code/docker_data
12+
RUN rm -Rf /code/docker_data/Dockerfiles && \
13+
mv /code/docker_data/* /code && \
14+
rm -Rf /code/docker_data && \
15+
chmod +x /code/run.py && \
16+
rm -Rf /code/run-with-freesurfer.sh
517
ENTRYPOINT ["/code/run.py"]
618

7-
# remove FreeSurfer, link libraries & clean up
8-
RUN rm -rf /usr/lib/freesurfer/ /code/run-with-freesurfer.sh /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
9-
ln -svf /usr/lib/x86_64-linux-gnu/libgsl.so.23 /usr/lib/x86_64-linux-gnu/libgsl.so.0 && ldconfig && \
10-
chmod 777 $(ls / | grep -v sys | grep -v proc)
19+
# link libraries & clean up
20+
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
21+
&& ldconfig \
22+
&& chmod 777 / \
23+
&& chmod 777 $(ls / | grep -v sys | grep -v proc)
1124

1225
# set user
1326
# USER c-pac_user

.github/Dockerfiles/FSL.5.0.10-bionic.Dockerfile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
FROM ghcr.io/shnizzedy/c-pac/fsl:neurodebian-bionic as FSL-Neurodebian
1+
# Copyright (C) 2021-2023 C-PAC Developers
2+
3+
# This file is part of C-PAC.
4+
5+
# C-PAC is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU Lesser General Public License as published by the
7+
# Free Software Foundation, either version 3 of the License, or (at your
8+
# option) any later version.
9+
10+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13+
# License for more details.
14+
15+
# You should have received a copy of the GNU Lesser General Public
16+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17+
FROM ghcr.io/fcp-indi/c-pac/fsl:data as data
218
FROM ghcr.io/fcp-indi/c-pac/ubuntu:bionic-non-free AS FSL
319

420
USER root
@@ -14,7 +30,6 @@ ENV FSLDIR=/usr/share/fsl/5.0 \
1430
PATH=/usr/lib/fsl/5.0:$PATH \
1531
TZ=America/New_York
1632

17-
1833
# Installing and setting up FSL
1934
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
2035
echo $TZ > /etc/timezone && \
@@ -45,4 +60,6 @@ COPY --from=FSL /usr/bin/wish /usr/bin/wish
4560
COPY --from=FSL /usr/share/fsl/ /usr/share/fsl/
4661
COPY --from=FSL /usr/lib/ /usr/lib/
4762
COPY --from=FSL /lib/x86_64-linux-gnu/lib*so* /lib/x86_64-linux-gnu/
48-
COPY --from=FSL-Neurodebian /usr/share/fsl/5.0/data/standard/tissuepriors/*mm /usr/share/fsl/5.0/data/standard/tissuepriors/
63+
# install C-PAC resources into FSL
64+
COPY --from=data /fsl_data/standard /usr/share/fsl/5.0/data/standard
65+
COPY --from=data /fsl_data/atlases /usr/share/fsl/5.0/data/atlases

.github/Dockerfiles/FSL.5.0.9-5.neurodebian-xenial.Dockerfile

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Copyright (C) 2021-2023 C-PAC Developers
2+
3+
# This file is part of C-PAC.
4+
5+
# C-PAC is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU Lesser General Public License as published by the
7+
# Free Software Foundation, either version 3 of the License, or (at your
8+
# option) any later version.
9+
10+
# C-PAC is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13+
# License for more details.
14+
15+
# You should have received a copy of the GNU Lesser General Public
16+
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
17+
FROM ghcr.io/fcp-indi/c-pac/fsl:data as data
118
FROM ghcr.io/fcp-indi/c-pac/ubuntu:xenial-20200114 as FSL
219
USER root
320

@@ -24,17 +41,6 @@ ENV FSLDIR=/usr/share/fsl/5.0 \
2441
AFNI_PLUGINPATH="/usr/lib/afni/plugins" \
2542
PATH=/usr/lib/fsl/5.0:$PATH
2643

27-
# install CPAC resources into FSL
28-
RUN curl -sL http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz -o /tmp/cpac_resources.tar.gz && \
29-
tar xfz /tmp/cpac_resources.tar.gz -C /tmp && \
30-
cp -n /tmp/cpac_image_resources/MNI_3mm/* $FSLDIR/data/standard && \
31-
cp -n /tmp/cpac_image_resources/MNI_4mm/* $FSLDIR/data/standard && \
32-
cp -n /tmp/cpac_image_resources/symmetric/* $FSLDIR/data/standard && \
33-
cp -n /tmp/cpac_image_resources/HarvardOxford-lateral-ventricles-thr25-2mm.nii.gz $FSLDIR/data/atlases/HarvardOxford && \
34-
cp -nr /tmp/cpac_image_resources/tissuepriors/2mm $FSLDIR/data/standard/tissuepriors && \
35-
cp -nr /tmp/cpac_image_resources/tissuepriors/3mm $FSLDIR/data/standard/tissuepriors && \
36-
chmod -R ugo+r $FSLDIR/data/standard
37-
3844
ENTRYPOINT ["/bin/bash"]
3945

4046
# Link libraries for Singularity images
@@ -59,3 +65,6 @@ COPY --from=FSL /usr/share/man/man1/fsl.1.gz /usr/share/man/man1/
5965
COPY --from=FSL /usr/share/data/fsl-mni152-templates /usr/share/data/fsl-mni152-templates
6066
COPY --from=FSL /usr/share/doc/fsl-mni152-templates /usr/share/doc/fsl-mni152-templates
6167
COPY --from=FSL /usr/share/fsl /usr/share/fsl
68+
# install C-PAC resources into FSL
69+
COPY --from=data /fsl_data/standard /usr/share/fsl/5.0/data/standard
70+
COPY --from=data /fsl_data/atlases /usr/share/fsl/5.0/data/atlases

0 commit comments

Comments
 (0)