From 27619cd8ced6b7d070e208acc27458e2f4ada269 Mon Sep 17 00:00:00 2001 From: jsmentch Date: Fri, 27 Mar 2020 13:04:45 -0400 Subject: [PATCH] making 2 files, one for debian, one for centos for bug fix --- Singularity.centos | 146 ++++++++++++++++++++++++++++++ Singularity => Singularity.debian | 0 2 files changed, 146 insertions(+) create mode 100644 Singularity.centos rename Singularity => Singularity.debian (100%) diff --git a/Singularity.centos b/Singularity.centos new file mode 100644 index 0000000..0556db6 --- /dev/null +++ b/Singularity.centos @@ -0,0 +1,146 @@ +# Your version: 0.6.0 Latest version: 0.6.0 +# Generated by Neurodocker version 0.6.0 +# Timestamp: 2020-03-27 17:03:07 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: centos + +%post +export ND_ENTRYPOINT="/neurodocker/startup.sh" +yum install -y -q \ + bzip2 \ + ca-certificates \ + curl \ + localedef \ + unzip +yum clean packages +rm -rf /var/cache/yum/* +localedef -i en_US -f UTF-8 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 + +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 neuro +conda install -y -q --name neuro \ + "numpy" \ + "pandas" \ + "scipy" \ + "scikit-learn" \ + "matplotlib" \ + "seaborn" \ + "networkx" \ + "ipython" \ + "joblib" \ + "nibabel" \ + "datalad" \ + "jupyter" +sync && conda clean --all && sync +bash -c "source activate neuro + pip install --no-cache-dir \ + "nibabel" \ + "ply" \ + "neurosynth" \ + "nilearn" \ + "pliers" \ + "kmapper" \ + "dyneusr"" +rm -rf ~/.cache/pip/* +sync + + +yum install -y None \ + emacs +yum clean packages +rm -rf /var/cache/yum/* + +test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro +su - neuro + +echo '{ +\n "pkg_manager": "yum", +\n "instructions": [ +\n [ +\n "base", +\n "centos" +\n ], +\n [ +\n "_header", +\n { +\n "version": "generic", +\n "method": "custom" +\n } +\n ], +\n [ +\n "miniconda", +\n { +\n "create_env": "neuro", +\n "conda_install": [ +\n "numpy", +\n "pandas", +\n "scipy", +\n "scikit-learn", +\n "matplotlib", +\n "seaborn", +\n "networkx", +\n "ipython", +\n "joblib", +\n "nibabel", +\n "datalad", +\n "jupyter" +\n ], +\n "pip_install": [ +\n "nibabel", +\n "ply", +\n "neurosynth", +\n "nilearn", +\n "pliers", +\n "kmapper", +\n "dyneusr" +\n ] +\n } +\n ], +\n [ +\n "install", +\n [ +\n "emacs" +\n ] +\n ], +\n [ +\n "user", +\n "neuro" +\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 "$@" diff --git a/Singularity b/Singularity.debian similarity index 100% rename from Singularity rename to Singularity.debian