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
216 changes: 180 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,180 @@
FROM alpine:3.8

RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache

RUN apk add --no-cache libpng freetype libstdc++ openblas libxml2 libxslt && \
apk add --no-cache --virtual .build-deps \
g++ gfortran file binutils \
openblas-dev \
python3-dev \
gcc \
build-base \
libpng-dev \
musl-dev \
freetype-dev \
libxml2-dev \
libxslt-dev && \
ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& pip3 install numpy \
&& pip3 install scipy==1.3.3 \
&& pip3 install pandas \
&& pip3 install matplotlib \
&& pip3 install joblib \
&& pip3 install rsHRF \
&& rm -r /root/.cache \
&& find /usr/lib/python3.*/ -name 'tests' -exec rm -r '{}' + \
&& find /usr/lib/python3.*/site-packages/ -name '*.so' -print -exec sh -c 'file "{}" | grep -q "not stripped" && strip -s "{}"' \; \
&& rm /usr/include/xlocale.h \
&& apk del .build-deps

ENTRYPOINT ["rsHRF"]
# Your version: 0.6.0 Latest version: 0.7.0
# Generated by Neurodocker version 0.6.0
# Timestamp: 2020-04-21 18:20:36 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

FROM neurodebian

ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN 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/* \
&& 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 '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

ENTRYPOINT ["/neurodocker/startup.sh"]

RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
libpng \
freetype \
libstdc++ \
openblas \
libxml2 \
libxslt \
g++ \
gfortran \
file \
binutils \
openblas-dev \
python3-dev \
gcc \
build-base \
libpng-dev \
musl-dev \
freetype-dev \
libxml2-dev \
libxslt-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

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

ENV CONDA_DIR="/opt/miniconda-latest" \
PATH="/opt/miniconda-latest/bin:$PATH"
RUN 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 --all && sync \
&& conda create -y -q --name rshrf \
&& conda install -y -q --name rshrf \
"python=3.7" \
"pandas" \
"scipy==1.3.3" \
"numpy" \
"matplotlib" \
"joblib" \
&& sync && conda clean --all && sync \
&& bash -c "source activate rshrf \
&& pip install --no-cache-dir \
"rsHRF"" \
&& rm -rf ~/.cache/pip/* \
&& sync \
&& sed -i '$isource activate rshrf' $ND_ENTRYPOINT

RUN mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \"0.0.0.0\" > ~/.jupyter/jupyter_notebook_config.py

ENTRYPOINT ["/neurodocker/startup.sh"]

WORKDIR /home/rshrf

CMD ["rshrf"]

RUN echo '{ \
\n "pkg_manager": "apt", \
\n "instructions": [ \
\n [ \
\n "base", \
\n "neurodebian" \
\n ], \
\n [ \
\n "install", \
\n [ \
\n "libpng", \
\n "freetype", \
\n "libstdc++", \
\n "openblas", \
\n "libxml2", \
\n "libxslt", \
\n "g++", \
\n "gfortran", \
\n "file", \
\n "binutils", \
\n "openblas-dev", \
\n "python3-dev", \
\n "gcc", \
\n "build-base", \
\n "libpng-dev", \
\n "musl-dev", \
\n "freetype-dev", \
\n "libxml2-dev", \
\n "libxslt-dev" \
\n ] \
\n ], \
\n [ \
\n "user", \
\n "rshrf" \
\n ], \
\n [ \
\n "miniconda", \
\n { \
\n "conda_install": [ \
\n "python=3.7", \
\n "pandas", \
\n "scipy==1.3.3", \
\n "numpy", \
\n "matplotlib", \
\n "joblib" \
\n ], \
\n "pip_install": [ \
\n "rsHRF" \
\n ], \
\n "create_env": "rshrf", \
\n "activate": true \
\n } \
\n ], \
\n [ \
\n "run", \
\n "mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \\\"0.0.0.0\\\" > ~/.jupyter/jupyter_notebook_config.py" \
\n ], \
\n [ \
\n "entrypoint", \
\n "/neurodocker/startup.sh" \
\n ], \
\n [ \
\n "workdir", \
\n "/home/rshrf" \
\n ], \
\n [ \
\n "cmd", \
\n [ \
\n "rshrf" \
\n ] \
\n ] \
\n ] \
\n}' > /neurodocker/neurodocker_specs.json
181 changes: 181 additions & 0 deletions Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Your version: 0.6.0 Latest version: 0.7.0
# Generated by Neurodocker version 0.6.0
# Timestamp: 2020-04-21 18:20:37 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

%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/*
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 '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

apt-get update -qq
apt-get install -y -q --no-install-recommends \
libpng \
freetype \
libstdc++ \
openblas \
libxml2 \
libxslt \
g++ \
gfortran \
file \
binutils \
openblas-dev \
python3-dev \
gcc \
build-base \
libpng-dev \
musl-dev \
freetype-dev \
libxml2-dev \
libxslt-dev
apt-get clean
rm -rf /var/lib/apt/lists/*

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

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 --all && sync
conda create -y -q --name rshrf
conda install -y -q --name rshrf \
"python=3.7" \
"pandas" \
"scipy==1.3.3" \
"numpy" \
"matplotlib" \
"joblib"
sync && conda clean --all && sync
bash -c "source activate rshrf
pip install --no-cache-dir \
"rsHRF""
rm -rf ~/.cache/pip/*
sync
sed -i '$isource activate rshrf' $ND_ENTRYPOINT


mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \"0.0.0.0\" > ~/.jupyter/jupyter_notebook_config.py

cd /home/rshrf

echo '{
\n "pkg_manager": "apt",
\n "instructions": [
\n [
\n "base",
\n "neurodebian"
\n ],
\n [
\n "_header",
\n {
\n "version": "generic",
\n "method": "custom"
\n }
\n ],
\n [
\n "install",
\n [
\n "libpng",
\n "freetype",
\n "libstdc++",
\n "openblas",
\n "libxml2",
\n "libxslt",
\n "g++",
\n "gfortran",
\n "file",
\n "binutils",
\n "openblas-dev",
\n "python3-dev",
\n "gcc",
\n "build-base",
\n "libpng-dev",
\n "musl-dev",
\n "freetype-dev",
\n "libxml2-dev",
\n "libxslt-dev"
\n ]
\n ],
\n [
\n "user",
\n "rshrf"
\n ],
\n [
\n "miniconda",
\n {
\n "conda_install": [
\n "python=3.7",
\n "pandas",
\n "scipy==1.3.3",
\n "numpy",
\n "matplotlib",
\n "joblib"
\n ],
\n "pip_install": [
\n "rsHRF"
\n ],
\n "create_env": "rshrf",
\n "activate": true
\n }
\n ],
\n [
\n "run",
\n "mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \\\"0.0.0.0\\\" > ~/.jupyter/jupyter_notebook_config.py"
\n ],
\n [
\n "entrypoint",
\n "/neurodocker/startup.sh"
\n ],
\n [
\n "workdir",
\n "/home/rshrf"
\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 CONDA_DIR="/opt/miniconda-latest"
export PATH="/opt/miniconda-latest/bin:$PATH"

%runscript
/neurodocker/startup.sh
Loading