Skip to content
Merged
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
63 changes: 36 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by Neurodocker version 0.4.2-dev
# Timestamp: 2018-10-15 12:01:29 UTC
# Generated by Neurodocker version 0.5.0
# Timestamp: 2019-07-14 08:54:07 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
Expand All @@ -24,7 +24,7 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
locales \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* \
&& 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" \
Expand All @@ -33,6 +33,7 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
Expand All @@ -59,14 +60,15 @@ RUN apt-get update -qq \
octave \
netbase \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
&& rm -rf /var/lib/apt/lists/*

RUN sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT

ENV FORCE_SPMMCR="1" \
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" \
MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab"
RUN apt-get update -qq \
RUN export TMPDIR="$(mktemp -d)" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
bc \
libncurses5 \
Expand All @@ -75,18 +77,19 @@ RUN apt-get update -qq \
libxpm-dev \
libxt6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading MATLAB Compiler Runtime ..." \
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& dpkg -i /tmp/toinstall.deb \
&& rm /tmp/toinstall.deb \
&& apt-get install -f \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& 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/* \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
&& chmod +x "$TMPDIR/MCRInstaller.bin" \
&& "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a" \
&& rm -rf "$TMPDIR" \
&& unset TMPDIR \
&& 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 \
Expand All @@ -97,9 +100,11 @@ RUN apt-get update -qq \
&& /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

RUN useradd --no-user-group --create-home --shell /bin/bash neuro
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
USER neuro

WORKDIR /home/neuro

ENV CONDA_DIR="/opt/miniconda-latest" \
PATH="/opt/miniconda-latest/bin:$PATH"
RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
Expand All @@ -112,23 +117,23 @@ RUN export PATH="/opt/miniconda-latest/bin:$PATH" \
&& 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 \
&& sync && conda clean --all && 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 \
'python=3.6' \
'pytest' \
'jupyter' \
'jupyterlab' \
'jupyter_contrib_nbextensions' \
'traits' \
'pandas' \
'matplotlib' \
'scikit-learn' \
'scikit-image' \
'seaborn' \
'nbformat' \
'nb_conda' \
&& sync && conda clean --all && sync \
&& bash -c "source activate neuro \
&& pip install --no-cache-dir \
https://github.com/nipy/nipype/tarball/master \
Expand Down Expand Up @@ -220,6 +225,10 @@ RUN echo '{ \
\n "neuro" \
\n ], \
\n [ \
\n "workdir", \
\n "/home/neuro" \
\n ], \
\n [ \
\n "miniconda", \
\n { \
\n "miniconda_version": "4.3.31", \
Expand Down
61 changes: 35 additions & 26 deletions Singularity
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by Neurodocker version 0.4.2-dev
# Timestamp: 2018-10-15 12:01:30 UTC
# Generated by Neurodocker version 0.5.0
# Timestamp: 2019-07-14 08:54:09 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
Expand All @@ -21,7 +21,7 @@ apt-get install -y -q --no-install-recommends \
locales \
unzip
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/*
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"
Expand All @@ -30,6 +30,7 @@ mkdir -p /neurodocker
if [ ! -f "$ND_ENTRYPOINT" ]; then
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT"
echo 'set -e' >> "$ND_ENTRYPOINT"
echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"
echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT";
fi
chmod -R 777 /neurodocker && chmod a+s /neurodocker
Expand All @@ -54,10 +55,11 @@ apt-get install -y -q --no-install-recommends \
octave \
netbase
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/*

sed -i '$isource /etc/fsl/fsl.sh' $ND_ENTRYPOINT

export TMPDIR="$(mktemp -d)"
apt-get update -qq
apt-get install -y -q --no-install-recommends \
bc \
Expand All @@ -67,18 +69,19 @@ apt-get install -y -q --no-install-recommends \
libxpm-dev \
libxt6
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/*
echo "Downloading MATLAB Compiler Runtime ..."
curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb
dpkg -i /tmp/toinstall.deb
rm /tmp/toinstall.deb
apt-get install -f
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
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/*
rm -rf /var/lib/apt/lists/*
curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin
chmod +x "$TMPDIR/MCRInstaller.bin"
"$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a"
rm -rf "$TMPDIR"
unset TMPDIR
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
Expand All @@ -89,9 +92,11 @@ 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

useradd --no-user-group --create-home --shell /bin/bash neuro
test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
su - neuro

cd /home/neuro

export PATH="/opt/miniconda-latest/bin:$PATH"
echo "Downloading Miniconda installer ..."
conda_installer="/tmp/miniconda.sh"
Expand All @@ -102,23 +107,23 @@ 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
sync && conda clean --all && 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
'python=3.6' \
'pytest' \
'jupyter' \
'jupyterlab' \
'jupyter_contrib_nbextensions' \
'traits' \
'pandas' \
'matplotlib' \
'scikit-learn' \
'scikit-image' \
'seaborn' \
'nbformat' \
'nb_conda'
sync && conda clean --all && sync
bash -c "source activate neuro
pip install --no-cache-dir \
https://github.com/nipy/nipype/tarball/master \
Expand Down Expand Up @@ -212,6 +217,10 @@ echo '{
\n "neuro"
\n ],
\n [
\n "workdir",
\n "/home/neuro"
\n ],
\n [
\n "miniconda",
\n {
\n "miniconda_version": "4.3.31",
Expand Down
2 changes: 2 additions & 0 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ generate_docker() {
--add-to-entrypoint "source /etc/fsl/fsl.sh" \
--spm12 version=r7219 \
--user=neuro \
--workdir /home/neuro \
--miniconda miniconda_version="4.3.31" \
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \
Expand Down Expand Up @@ -51,6 +52,7 @@ generate_singularity() {
--add-to-entrypoint "source /etc/fsl/fsl.sh" \
--spm12 version=r7219 \
--user=neuro \
--workdir /home/neuro \
--miniconda miniconda_version="4.3.31" \
conda_install="python=3.6 pytest jupyter jupyterlab jupyter_contrib_nbextensions
traits pandas matplotlib scikit-learn scikit-image seaborn nbformat nb_conda" \
Expand Down