Created
March 2, 2020 21:48
-
-
Save nataliavelez/b29d257e8e3e6c689a5a2cb2c75eb4e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Neurodocker version 0.4.1-16-ga36d295 | |
# Timestamp: 2019-04-11 21:06:03 UTC | |
# | |
# Thank you for using Neurodocker. If you discover any issues | |
# or ways to improve this software, please submit an issue or | |
# pull request on our GitHub repository: | |
# | |
# https://github.com/kaczmarj/neurodocker | |
Bootstrap: docker | |
From: neurodebian:stretch-non-free | |
%post | |
export ND_ENTRYPOINT="/neurodocker/startup.sh" | |
apt-get update -qq | |
apt-get install -y -q --no-install-recommends \ | |
apt-utils \ | |
bzip2 \ | |
ca-certificates \ | |
curl \ | |
locales \ | |
unzip | |
apt-get clean | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen | |
dpkg-reconfigure --frontend=noninteractive locales | |
update-locale LANG="en_US.UTF-8" | |
chmod 777 /opt && chmod a+s /opt | |
mkdir -p /neurodocker | |
if [ ! -f "$ND_ENTRYPOINT" ]; then | |
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" | |
echo 'set -e' >> "$ND_ENTRYPOINT" | |
echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; | |
fi | |
chmod -R 777 /neurodocker && chmod a+s /neurodocker | |
apt-get update -qq | |
apt-get install -y -q --no-install-recommends \ | |
convert3d \ | |
ants \ | |
fsl-complete \ | |
gcc \ | |
g++ \ | |
graphviz \ | |
tree \ | |
git-annex-standalone \ | |
vim \ | |
emacs-nox \ | |
nano \ | |
less \ | |
ncdu \ | |
tig \ | |
git-annex-remote-rclone \ | |
octave \ | |
netbase \ | |
curl \ | |
gnupg | |
apt-get clean | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT | |
apt-get update -qq | |
apt-get install -y -q --no-install-recommends \ | |
bc \ | |
libxext6 \ | |
libxpm-dev \ | |
libxt6 | |
apt-get clean | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
echo "Downloading MATLAB Compiler Runtime ..." | |
curl -fsSL --retry 5 -o /tmp/MCRInstaller.bin https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin | |
chmod +x /tmp/MCRInstaller.bin | |
/tmp/MCRInstaller.bin -silent -P installLocation="/opt/matlabmcr-2010a" | |
rm -rf /tmp/* | |
echo "Downloading standalone SPM ..." | |
curl -fsSL --retry 5 -o /tmp/spm12.zip http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip | |
unzip -q /tmp/spm12.zip -d /tmp | |
mkdir -p /opt/spm12-r7219 | |
mv /tmp/spm12/* /opt/spm12-r7219/ | |
chmod -R 777 /opt/spm12-r7219 | |
rm -rf /tmp/* | |
/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 quit | |
sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT | |
export PATH="/opt/miniconda-latest/bin:$PATH" | |
echo "Downloading Miniconda installer ..." | |
conda_installer="/tmp/miniconda.sh" | |
curl -fsSL --retry 5 -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 config --system --prepend channels conda-forge | |
conda config --system --set auto_update_conda false | |
conda config --system --set show_channel_urls true | |
sync && conda clean -tipsy && sync | |
conda create -y -q --name neuro | |
conda install -y -q --name neuro \ | |
python=3.6 \ | |
pytest \ | |
jupyter \ | |
jupyterlab \ | |
jupyter_contrib_nbextensions \ | |
traits \ | |
pandas \ | |
matplotlib \ | |
scikit-learn \ | |
scikit-image \ | |
seaborn \ | |
nbformat \ | |
nb_conda | |
sync && conda clean -tipsy && sync | |
bash -c "source activate neuro | |
pip install --no-cache-dir \ | |
https://github.com/nipy/nipype/tarball/master \ | |
https://github.com/INCF/pybids/tarball/master \ | |
nilearn \ | |
datalad[full] \ | |
nipy \ | |
nbval \ | |
xlrd" | |
rm -rf ~/.cache/pip/* | |
sync | |
sed -i '$isource activate neuro' $ND_ENTRYPOINT | |
bash -c 'git clone https://github.com/poldracklab/pydeface.git && | |
cd pydeface && | |
python setup.py install' | |
bash -c 'git clone https://github.com/tknapen/FIRDeconvolution.git && | |
source activate neuro && | |
pip install ./FIRDeconvolution' | |
echo '{ | |
\n "pkg_manager": "apt", | |
\n "instructions": [ | |
\n [ | |
\n "base", | |
\n "neurodebian:stretch-non-free" | |
\n ], | |
\n [ | |
\n "_header", | |
\n { | |
\n "version": "generic", | |
\n "method": "custom" | |
\n } | |
\n ], | |
\n [ | |
\n "install", | |
\n [ | |
\n "convert3d", | |
\n "ants", | |
\n "fsl-complete", | |
\n "gcc", | |
\n "g++", | |
\n "graphviz", | |
\n "tree", | |
\n "git-annex-standalone", | |
\n "vim", | |
\n "emacs-nox", | |
\n "nano", | |
\n "less", | |
\n "ncdu", | |
\n "tig", | |
\n "git-annex-remote-rclone", | |
\n "octave", | |
\n "netbase", | |
\n "curl", | |
\n "gnupg" | |
\n ] | |
\n ], | |
\n [ | |
\n "add_to_entrypoint", | |
\n "source /etc/fsl/fsl.sh" | |
\n ], | |
\n [ | |
\n "spm12", | |
\n { | |
\n "version": "r7219", | |
\n "method": "binaries" | |
\n } | |
\n ], | |
\n [ | |
\n "miniconda", | |
\n { | |
\n "conda_install": [ | |
\n "python=3.6", | |
\n "pytest", | |
\n "jupyter", | |
\n "jupyterlab", | |
\n "jupyter_contrib_nbextensions", | |
\n "traits", | |
\n "pandas", | |
\n "matplotlib", | |
\n "scikit-learn", | |
\n "scikit-image", | |
\n "seaborn", | |
\n "nbformat", | |
\n "nb_conda" | |
\n ], | |
\n "pip_install": [ | |
\n "https://github.com/nipy/nipype/tarball/master", | |
\n "https://github.com/INCF/pybids/tarball/master", | |
\n "nilearn", | |
\n "datalad[full]", | |
\n "nipy", | |
\n "nbval", | |
\n "xlrd" | |
\n ], | |
\n "create_env": "neuro", | |
\n "activate": true | |
\n } | |
\n ], | |
\n [ | |
\n "run_bash", | |
\n "git clone https://github.com/poldracklab/pydeface.git &&\\n cd pydeface &&\\n python setup.py install" | |
\n ], | |
\n [ | |
\n "run_bash", | |
\n "git clone https://github.com/tknapen/FIRDeconvolution.git &&\\n source activate neuro &&\\n pip install ./FIRDeconvolution" | |
\n ], | |
\n [ | |
\n "env", | |
\n { | |
\n "XDG_RUNTIME_DIR": "" | |
\n } | |
\n ] | |
\n ] | |
\n}' > /neurodocker/neurodocker_specs.json | |
%environment | |
export LANG="en_US.UTF-8" | |
export LC_ALL="en_US.UTF-8" | |
export ND_ENTRYPOINT="/neurodocker/startup.sh" | |
export FORCE_SPMMCR="1" | |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/matlabmcr-2010a/v713/runtime/glnxa64:/opt/matlabmcr-2010a/v713/bin/glnxa64:/opt/matlabmcr-2010a/v713/sys/os/glnxa64:/opt/matlabmcr-2010a/v713/extern/bin/glnxa64" | |
export MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab" | |
export CONDA_DIR="/opt/miniconda-latest" | |
export PATH="/opt/miniconda-latest/bin:$PATH" | |
export XDG_RUNTIME_DIR="" | |
echo "alias notebook='jupyter notebook --no-browser --port=32192'" > ~/.bashrc | |
%runscript | |
/neurodocker/startup.sh "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment