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
36 changes: 34 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ jobs:
FS_MAJOR_VERSION=<< parameters.version >>
if [[ FS_MAJOR_VERSION -eq 6 ]]; then
FS_VERSION=6.0.1
else
elif [[ FS_MAJOR_VERSION -eq 7 ]]; then
FS_VERSION=7.4.1
else
FS_VERSION=8.2.0
fi

: "Pushing unstable versions for ${FS_MAJOR_VERSION} to DockerHub"
Expand Down Expand Up @@ -227,7 +229,7 @@ jobs:

else
: "No DOCKER_TOKEN, skipping push to DockerHub"
exit 1
exit 0
fi

workflows:
Expand All @@ -252,6 +254,20 @@ workflows:
branches:
only: /.*/

# fs8 has no precomputed group2 fixture (test job compares against
# ds114_test<N>_freesurfer_precomp_v6.0.0), so it's built/deployed here
# without going through the test job/matrix, unlike 6/7.
- build:
name: build_<< matrix.version >>
matrix:
parameters:
version: ['8']
filters:
tags:
only: /.*/
branches:
only: /.*/

- test:
name: test_<< matrix.version >>_<< matrix.test >>
matrix:
Expand Down Expand Up @@ -281,3 +297,19 @@ workflows:
only: /.*/
tags:
only: /.*/

# No test_8_* jobs (see build_8 above), so this only requires build_8.
- deploy:
name: deploy_<< matrix.version >>
matrix:
parameters:
version: ['8']
context:
- dockerhub
requires:
- build_<< matrix.version >>
filters:
branches:
only: /.*/
tags:
only: /.*/
58 changes: 13 additions & 45 deletions Dockerfile_fs6
Original file line number Diff line number Diff line change
Expand Up @@ -64,43 +64,7 @@ RUN apt-get update -qq \
--exclude='subjects/fsaverage6' \
--exclude='subjects/fsaverage_sym' \
--exclude='trctrain'
ENV CONDA_DIR="/opt/miniconda-latest" \
PATH="/opt/miniconda-latest/bin:$PATH"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bzip2 \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/* \
# Install dependencies.
&& export PATH="/opt/miniconda-latest/bin:$PATH" \
&& echo "Downloading Miniconda installer ..." \
&& conda_installer="/tmp/miniconda.sh" \
&& curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash "$conda_installer" -b -p /opt/miniconda-latest \
&& rm -f "$conda_installer" \
&& conda update -yq -nbase conda \
&& conda install -yq -nbase conda-libmamba-solver \
&& conda config --set solver libmamba \
# Prefer packages in conda-forge
&& conda config --system --prepend channels conda-forge \
# Packages in lower-priority channels not considered if a package with the same
# name exists in a higher priority channel. Can dramatically speed up installations.
# Conda recommends this as a default
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html
&& conda config --set channel_priority strict \
&& conda config --system --set auto_update_conda false \
&& conda config --system --set show_channel_urls true \
# Enable `conda activate`
&& conda init bash \
&& conda install -y --name base \
"pandas=1.5.3" \
&& bash -c "source activate base \
&& python -m pip install --no-cache-dir \
"nibabel"" \
# Clean up
&& sync && conda clean --all --yes && sync \
&& rm -rf ~/.cache/pip/*
RUN bash -c 'apt-get update -qq && apt-get install -y -q --no-install-recommends bzip2 ca-certificates curl && rm -rf /var/lib/apt/lists/* && export PATH="/opt/miniconda-latest/bin:$PATH" && echo "Downloading Miniconda installer ..." && conda_installer="/tmp/miniconda.sh" && curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash "$conda_installer" -b -p /opt/miniconda-latest && rm -f "$conda_installer" && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && conda update -yq -nbase conda && conda install -yq -nbase conda-libmamba-solver && conda config --set solver libmamba && conda config --system --prepend channels conda-forge && conda config --set channel_priority strict && conda config --system --set auto_update_conda false && conda config --system --set show_channel_urls true && conda init bash && conda install -y --name base pandas && bash -c "source activate base && python -m pip install --no-cache-dir nibabel" && sync && conda clean --all --yes && sync && rm -rf ~/.cache/pip/*'
RUN bash -c 'curl -sL https://deb.nodesource.com/setup_18.x | bash -'
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
Expand All @@ -114,6 +78,7 @@ ENV FSLDIR="/usr/share/fsl/5.0" \
LD_LIBRARY_PATH="/usr/lib/fsl/5.0:" \
FSLTCLSH="/usr/bin/tclsh" \
FSLWISH="/usr/bin/wish"
ENV FS_VERSION="6.0.1"
ENV OS="Linux" \
FS_OVERRIDE="0" \
FIX_VERTEX_AREA="" \
Expand All @@ -122,11 +87,13 @@ ENV OS="Linux" \
MNI_DIR="/opt/freesurfer/mni" \
LOCAL_DIR="/opt/freesurfer/local" \
FREESURFER_HOME="/opt/freesurfer" \
FREESURFER="/opt/freesurfer" \
FSFAST_HOME="/opt/freesurfer/fsfast" \
MINC_BIN_DIR="/opt/freesurfer/mni/bin" \
MINC_LIB_DIR="/opt/freesurfer/mni/lib" \
MNI_DATAPATH="/opt/freesurfer/mni/data" \
FMRI_ANALYSIS_DIR="/opt/freesurfer/fsfast" \
FUNCTIONALS_DIR="/opt/freesurfer/sessions" \
PERL5LIB="/opt/freesurfer/mni/share/perl5" \
MNI_PERL5LIB="/opt/freesurfer/mni/share/perl5/" \
PATH="/opt/miniconda-latest/bin:/opt/freesurfer/bin:/opt/freesurfer/fsfast/bin:/opt/freesurfer/tktools:/opt/freesurfer/mni/bin:/usr/lib/fsl/5.0:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
Expand Down Expand Up @@ -211,17 +178,10 @@ RUN printf '{ \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bc \\\\\\n ca-certificates \\\\\\n curl \\\\\\n libgomp1 \\\\\\n libxmu6 \\\\\\n libxt6 \\\\\\n perl \\\\\\n tcsh\\nrm -rf /var/lib/apt/lists/*\\necho \\"Downloading FreeSurfer ...\\"\\nmkdir -p /opt/freesurfer\\ncurl -fL ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz \\\\\\n| tar -xz -C /opt/freesurfer --owner root --group root --no-same-owner --strip-components 1 \\\\\\n --exclude='"'"'average/mult-comp-cor'"'"' \\\\\\n --exclude='"'"'lib/cuda'"'"' \\\\\\n --exclude='"'"'lib/qt'"'"' \\\\\\n --exclude='"'"'subjects/V1_average'"'"' \\\\\\n --exclude='"'"'subjects/bert'"'"' \\\\\\n --exclude='"'"'subjects/cvs_avg35'"'"' \\\\\\n --exclude='"'"'subjects/cvs_avg35_inMNI152'"'"' \\\\\\n --exclude='"'"'subjects/fsaverage3'"'"' \\\\\\n --exclude='"'"'subjects/fsaverage4'"'"' \\\\\\n --exclude='"'"'subjects/fsaverage5'"'"' \\\\\\n --exclude='"'"'subjects/fsaverage6'"'"' \\\\\\n --exclude='"'"'subjects/fsaverage_sym'"'"' \\\\\\n --exclude='"'"'trctrain'"'"'" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"CONDA_DIR": "/opt/miniconda-latest", \
"PATH": "/opt/miniconda-latest/bin:$PATH" \
} \
}, \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\n# Install dependencies.\\nexport PATH=\\"/opt/miniconda-latest/bin:$PATH\\"\\necho \\"Downloading Miniconda installer ...\\"\\nconda_installer=\\"/tmp/miniconda.sh\\"\\ncurl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\\nbash \\"$conda_installer\\" -b -p /opt/miniconda-latest\\nrm -f \\"$conda_installer\\"\\nconda update -yq -nbase conda\\nconda install -yq -nbase conda-libmamba-solver\\nconda config --set solver libmamba\\n# Prefer packages in conda-forge\\nconda config --system --prepend channels conda-forge\\n# Packages in lower-priority channels not considered if a package with the same\\n# name exists in a higher priority channel. Can dramatically speed up installations.\\n# Conda recommends this as a default\\n# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html\\nconda config --set channel_priority strict\\nconda config --system --set auto_update_conda false\\nconda config --system --set show_channel_urls true\\n# Enable `conda activate`\\nconda init bash\\nconda install -y --name base \\\\\\n \\"pandas=1.5.3\\"\\nbash -c \\"source activate base\\n python -m pip install --no-cache-dir \\\\\\n \\"nibabel\\"\\"\\n# Clean up\\nsync && conda clean --all --yes && sync\\nrm -rf ~/.cache/pip/*" \
"command": "bash -c '"'"'apt-get update -qq && apt-get install -y -q --no-install-recommends bzip2 ca-certificates curl && rm -rf /var/lib/apt/lists/* && export PATH=\\"/opt/miniconda-latest/bin:$PATH\\" && echo \\"Downloading Miniconda installer ...\\" && conda_installer=\\"/tmp/miniconda.sh\\" && curl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash \\"$conda_installer\\" -b -p /opt/miniconda-latest && rm -f \\"$conda_installer\\" && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && conda update -yq -nbase conda && conda install -yq -nbase conda-libmamba-solver && conda config --set solver libmamba && conda config --system --prepend channels conda-forge && conda config --set channel_priority strict && conda config --system --set auto_update_conda false && conda config --system --set show_channel_urls true && conda init bash && conda install -y --name base pandas && bash -c \\"source activate base && python -m pip install --no-cache-dir nibabel\\" && sync && conda clean --all --yes && sync && rm -rf ~/.cache/pip/*'"'"'" \
} \
}, \
{ \
Expand Down Expand Up @@ -263,6 +223,12 @@ RUN printf '{ \
"FSLWISH": "/usr/bin/wish" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
"FS_VERSION": "6.0.1" \
} \
}, \
{ \
"name": "env", \
"kwds": { \
Expand All @@ -274,11 +240,13 @@ RUN printf '{ \
"MNI_DIR": "/opt/freesurfer/mni", \
"LOCAL_DIR": "/opt/freesurfer/local", \
"FREESURFER_HOME": "/opt/freesurfer", \
"FREESURFER": "/opt/freesurfer", \
"FSFAST_HOME": "/opt/freesurfer/fsfast", \
"MINC_BIN_DIR": "/opt/freesurfer/mni/bin", \
"MINC_LIB_DIR": "/opt/freesurfer/mni/lib", \
"MNI_DATAPATH": "/opt/freesurfer/mni/data", \
"FMRI_ANALYSIS_DIR": "/opt/freesurfer/fsfast", \
"FUNCTIONALS_DIR": "/opt/freesurfer/sessions", \
"PERL5LIB": "/opt/freesurfer/mni/share/perl5", \
"MNI_PERL5LIB": "/opt/freesurfer/mni/share/perl5/", \
"PATH": "/opt/miniconda-latest/bin:/opt/freesurfer/bin:/opt/freesurfer/fsfast/bin:/opt/freesurfer/tktools:/opt/freesurfer/mni/bin:/usr/lib/fsl/5.0:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", \
Expand Down
Loading