From 2d04052c2bd414f1223d6820cd727e72da13ba58 Mon Sep 17 00:00:00 2001 From: Geert van Geest Date: Wed, 19 Oct 2022 16:37:15 +0200 Subject: [PATCH] adds script to install singularity --- scripts/install_singularity.sh | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scripts/install_singularity.sh diff --git a/scripts/install_singularity.sh b/scripts/install_singularity.sh new file mode 100644 index 0000000..5273f16 --- /dev/null +++ b/scripts/install_singularity.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# you can add this script as init for AWS server + +sudo apt-get update && sudo apt-get install -y \ + build-essential \ + libseccomp-dev \ + libglib2.0-dev \ + uuid-dev \ + libgpgme-dev \ + squashfs-tools \ + libseccomp-dev \ + wget \ + pkg-config \ + git \ + cryptsetup \ + runc + +export VERSION=1.19.2 OS=linux ARCH=amd64 && \ + wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \ + sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \ + rm go$VERSION.$OS-$ARCH.tar.gz + +echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \ + echo 'export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin' >> ~/.bashrc && \ + source ~/.bashrc + +git clone --recurse-submodules https://github.com/sylabs/singularity.git +cd singularity + +git checkout --recurse-submodules v3.10.3 + +./mconfig && \ +make -C ./builddir && \ +sudo make -C ./builddir install