From 220f0ecffb485f72ca4a389801ee6b7fb64be159 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Mon, 4 Mar 2019 15:01:08 +0100
Subject: [PATCH] file_handle: add singularity files

---
 .../file_handle/0.1.1/build.sh                |  3 +++
 .../file_handle/0.1.1/file_handle.def         | 27 +++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 src/singularity_modules/file_handle/0.1.1/build.sh
 create mode 100644 src/singularity_modules/file_handle/0.1.1/file_handle.def

diff --git a/src/singularity_modules/file_handle/0.1.1/build.sh b/src/singularity_modules/file_handle/0.1.1/build.sh
new file mode 100755
index 0000000..bc7db8a
--- /dev/null
+++ b/src/singularity_modules/file_handle/0.1.1/build.sh
@@ -0,0 +1,3 @@
+#/bin/sh
+sudo singularity build --force bin/file_handle:0.1.1.sif src/singularity_modules/file_handle/0.1.1/file_handle.def
+singularity sign bin/file_handle:0.1.1.sif
diff --git a/src/singularity_modules/file_handle/0.1.1/file_handle.def b/src/singularity_modules/file_handle/0.1.1/file_handle.def
new file mode 100644
index 0000000..f80a9ae
--- /dev/null
+++ b/src/singularity_modules/file_handle/0.1.1/file_handle.def
@@ -0,0 +1,27 @@
+Bootstrap: docker
+From: ubuntu:18.04
+
+%labels
+MAINTAINER Laurent Modolo
+
+%post
+
+FILE_HANDLE_VERSION=0.1.1
+PACKAGES="git \
+ca-certificates "
+
+apt-get update && \
+apt-get install -y --no-install-recommends ${PACKAGES} && \
+apt-get clean
+
+git clone https://github.com/LBMC/file_handle.git && \
+cd file_handle && \
+git checkout tags/v${FILE_HANDLE_VERSION} && \
+cp src/file_handle.py /usr/bin/file_handle.py && \
+chmod +x /usr/bin/file_handle.py
+
+%environment
+export FILE_HANDLE_VERSION=0.1.1
+
+%runscript
+exec /bin/bash "$@"
-- 
GitLab