From 08fdbc38891d0c0a6bbb24a0a4464ec358e9f53f Mon Sep 17 00:00:00 2001
From: Johannes Schumann <jschumann@km3net.de>
Date: Sun, 1 Mar 2020 14:49:01 +0100
Subject: [PATCH] Resolve "Singularity and python3"

---
 base/singularity-py3:3.5.3 | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 base/singularity-py3:3.5.3

diff --git a/base/singularity-py3:3.5.3 b/base/singularity-py3:3.5.3
new file mode 100644
index 0000000..e9426aa
--- /dev/null
+++ b/base/singularity-py3:3.5.3
@@ -0,0 +1,37 @@
+FROM python:3.8.1
+  MAINTAINER Johannes Schumann <jschumann@km3net.de>
+#Install Singularity as described on https://github.com/sylabs/singularity/blob/master/INSTALL.md
+  RUN apt-get update -qq && apt-get install -qq -y wget bzip2 python-pip git zsh libhdf5-dev
+  RUN apt-get install -qq -y build-essential libssl-dev uuid-dev libgpgme11-dev libseccomp-dev pkg-config squashfs-tools 
+  RUN export VERSION=1.14 OS=linux ARCH=amd64 && wget -q -O /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/go${VERSION}.${OS}-${ARCH}.tar.gz && \ 
+ tar -C /usr/local -xzf /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz
+  RUN export GOPATH=${HOME}/go && mkdir -p ${GOPATH}/src/github.com/sylabs && cd ${GOPATH}/src/github.com/sylabs &&\ 
+ git clone https://github.com/sylabs/singularity.git && cd singularity && git checkout v3.5.3-rc.2
+  RUN export GOPATH=${HOME}/go && export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin && cd ${GOPATH}/src/github.com/sylabs/singularity && ./mconfig && cd ./builddir && make && make install
+#Include Jpp shell functions:
+  RUN wget https://git.km3net.de/common/jpp/raw/758d57dae93c9624670e2e9dde2aef5b5186d732/software/scripts/ulib.sh?inline=false -O /usr/local/bin/ulib.sh && chmod a+rx /usr/local/bin/ulib.sh
+ 
+#Install basic python modules
+  RUN pip install -U pip setuptools wheel
+
+  RUN pip install numpy
+  RUN pip install scipy pandas sklearn statsmodels numba numexpr tables h5py
+  RUN pip install pytest pytest-cov docopt sphinx sphinx-gallery
+  RUN pip install matplotlib seaborn pillow ipython jupyter notebook pillow
+
+
+
+#Set the go environment 
+   RUN echo '\
+ export GOPATH=${HOME}/go\n\
+ export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin'\
+     >> /etc/profile.d/go_env.sh
+
+#Set the ulib (Jpp) environment
+   RUN echo '\
+ if [[ -f /usr/local/bin/ulib.sh ]]\n\
+ then\n\
+ source /usr/local/bin/ulib.sh\n\
+ fi\n'\
+     >> /etc/zsh/zshenv
+ CMD ["/bin/zsh"]
-- 
GitLab