Skip to content

Commit

Permalink
making 2 files, one for debian, one for centos for bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmentch committed Mar 27, 2020
1 parent 6f698c6 commit 27619cd
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 0 deletions.
146 changes: 146 additions & 0 deletions Singularity.centos
Original file line number Diff line number Diff line change
@@ -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 "$@"
File renamed without changes.

0 comments on commit 27619cd

Please sign in to comment.