Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TEST: Install FSL without NeuroDebian #2763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
115 changes: 54 additions & 61 deletions docker/generate_dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,77 +52,70 @@ do
esac
done


# neurodocker version 0.3.1-22-gb0ee069
NEURODOCKER_IMAGE="kaczmarj/neurodocker@sha256:f15ca90803f4b89acfca55cd1c7269bf2ec2dfd95b3de1118b08afa34b87d9d1"

# neurodebian:stretch-non-free pulled on November 3, 2017
BASE_IMAGE="neurodebian@sha256:7590552afd0e7a481a33314724ae27f76ccedd05ffd7ac06ec38638872427b9b"
# neurodocker version 0.4.1-22-g7c44e01
NEURODOCKER_IMAGE="kaczmarj/neurodocker:master@sha256:858632a7533cac100f70932749b4cfc77fc40f667f41fca208f406215cff8a27"
# neurodebian:stretch-non-free pulled on September 19, 2018
BASE_IMAGE="neurodebian:stretch-non-free@sha256:7cd978427d7ad215834fee221d0536ed7825b3cddebc481eba2d792dfc2f7332"

NIPYPE_BASE_IMAGE="nipype/nipype:base"
PKG_MANAGER="apt"
DIR="$(dirname "$0")"

function generate_base_dockerfile() {
docker run --rm "$NEURODOCKER_IMAGE" generate \
--base "$BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \
--label maintainer="The nipype developers https://github.com/nipy/nipype" \
--spm version=12 matlab_version=R2017a \
--afni version=latest install_python2=true \
--freesurfer version=6.0.0 min=true \
--run 'echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh' \
--install ants apt-utils bzip2 convert3d file fsl-core fsl-mni152-templates \
fusefat g++ git graphviz make ruby unzip xvfb \
--add-to-entrypoint "source /etc/fsl/fsl.sh" \
--env ANTSPATH='/usr/lib/ants' PATH='/usr/lib/ants:$PATH' \
--run "gem install fakes3" \
--no-check-urls > "$DIR/Dockerfile.base"
docker run --rm "$NEURODOCKER_IMAGE" generate docker \
--base "$BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \
--label maintainer="The nipype developers https://github.com/nipy/nipype" \
--spm12 version=r7219 \
--freesurfer version=6.0.0-min \
--run 'echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tCjUxNzIKICpDdnVtdkVWM3pUZmcKRlM1Si8yYzFhZ2c0RQoiID4gL29wdC9mcmVlc3VyZmVyLTYuMC4wLW1pbi9saWNlbnNlLnR4dA==" | base64 -d | sh' \
--fsl version=5.0.9 \
--install afni ants apt-utils bzip2 convert3d file \
fusefat g++ git graphviz make python ruby \
unzip xvfb \
--add-to-entrypoint "source /etc/afni/afni.sh" \
--env ANTSPATH='/usr/lib/ants' \
PATH='/usr/lib/ants:$PATH' \
--run "gem install fakes3" \
> "$DIR/Dockerfile.base"
}


function generate_main_dockerfile() {
docker run --rm "$NEURODOCKER_IMAGE" generate \
--base "$NIPYPE_BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \
--label maintainer="The nipype developers https://github.com/nipy/nipype" \
--env MKL_NUM_THREADS=1 OMP_NUM_THREADS=1 \
--user neuro \
--miniconda env_name=neuro \
activate=true \
--copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
--copy . /src/nipype \
--user root \
--run 'chown -R neuro /src
&& chmod +x /usr/bin/fsl_imglob.py /usr/bin/run_*.sh
&& . /etc/fsl/fsl.sh
&& ln -sf /usr/bin/fsl_imglob.py ${FSLDIR}/bin/imglob
&& mkdir /work
&& chown neuro /work' \
--user neuro \
--arg PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=6 BUILD_DATE VCS_REF VERSION \
--miniconda env_name=neuro \
conda_install='python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
pandas psutil scikit-learn scipy traits=4.6.0' \
pip_opts="-e" \
pip_install="/src/nipype[all]" \
--miniconda env_name=neuro \
pip_install="grabbit==0.1.2" \
--run-bash "mkdir -p /src/pybids
&& curl -sSL --retry 5 https://github.com/INCF/pybids/tarball/0.5.1
| tar -xz -C /src/pybids --strip-components 1
&& source activate neuro
&& pip install --no-cache-dir -e /src/pybids" \
--workdir /work \
--label org.label-schema.build-date='$BUILD_DATE' \
org.label-schema.name="NIPYPE" \
org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \
org.label-schema.url="http://nipype.readthedocs.io" \
org.label-schema.vcs-ref='$VCS_REF' \
org.label-schema.vcs-url="https://github.com/nipy/nipype" \
org.label-schema.version='$VERSION' \
org.label-schema.schema-version="1.0" \
--no-check-urls
docker run --rm "$NEURODOCKER_IMAGE" generate docker \
--base "$NIPYPE_BASE_IMAGE" --pkg-manager "$PKG_MANAGER" \
--label maintainer="The nipype developers https://github.com/nipy/nipype" \
--env MKL_NUM_THREADS=1 \
OMP_NUM_THREADS=1 \
--arg PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=6 BUILD_DATE VCS_REF VERSION \
--user neuro \
--miniconda create_env=neuro \
conda_install='python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
icu=58.1 libxml2 libxslt matplotlib mkl numpy paramiko
pandas psutil scikit-learn scipy traits=4.6.0' \
pip_install="grabbit==0.1.2 https://github.com/INCF/pybids/tarball/0.6.5" \
activate=true \
--copy docker/files/run_builddocs.sh docker/files/run_examples.sh \
docker/files/run_pytests.sh nipype/external/fsl_imglob.py /usr/bin/ \
--copy . /src/nipype \
--user root \
--run 'chown -R neuro /src
&& chmod +x /usr/bin/run_*.sh
&& . ${FSLDIR}/etc/fslconf/fsl.sh
&& mkdir /work
&& chown neuro /work' \
--user neuro \
--miniconda use_env=neuro \
pip_opts="-e" \
pip_install="/src/nipype[all]" \
--workdir /work \
--label org.label-schema.build-date='$BUILD_DATE' \
org.label-schema.name="NIPYPE" \
org.label-schema.description="NIPYPE - Neuroimaging in Python: Pipelines and Interfaces" \
org.label-schema.url="http://nipype.readthedocs.io" \
org.label-schema.vcs-ref='$VCS_REF' \
org.label-schema.vcs-url="https://github.com/nipy/nipype" \
org.label-schema.version='$VERSION' \
org.label-schema.schema-version="1.0"
}


Expand Down