Skip to content
Snippets Groups Projects
Commit 0efcb925 authored by Marty Kandes's avatar Marty Kandes
Browse files

Add Singularity.singularity-3.5.3

This is a testbed container to explore the potential use cases of
running Singularity within a Singularity container.
parent 303a2239
No related branches found
No related tags found
No related merge requests found
Bootstrap: debootstrap
MirrorURL: http://us.archive.ubuntu.com/ubuntu
OSVersion: focal
%labels
APPLICATION_NAME Singularity
APPLICATION_VERSION 3.5.3
APPLICATION_URL https://sylabs.io/guides/3.5/user-guide/
AUTHOR_NAME Marty Kandes
AUTHOR_EMAIL mkandes@sdsc.edu
LAST_UPDATED 20210425
%setup
%environment
# Set operating system mirror URL
export MIRRORURL='http://us.archive.ubuntu.com/ubuntu'
# Set operating system version
export OSVERSION='focal'
# Set system locale
export LC_ALL='C'
# Set debian frontend interface
export DEBIAN_FRONTEND='noninteractive'
%post -c /bin/bash
# Set operating system mirror URL
export MIRRORURL='http://us.archive.ubuntu.com/ubuntu'
# Set operating system version
export OSVERSION='focal'
# Set system locale
export LC_ALL=C
# Set debian frontend interface
export DEBIAN_FRONTEND='noninteractive'
# Install system metapackages
apt-get -y install ubuntu-standard
apt-get -y install ubuntu-server
# Add repositories
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security restricted"
# Upgrade all software packages to their latest versions
apt-get -y update && apt-get -y upgrade
# Install common packages from 'main'
apt-get -y install autoconf
apt-get -y install automake
apt-get -y install build-essential
apt-get -y install cmake
apt-get -y install evince
apt-get -y install expect
apt-get -y install gfortran
apt-get -y install libtool
apt-get -y install mlocate
apt-get -y install pkg-config
apt-get -y install wget
apt-get -y install zip
# Install Singularity dependencies
apt-get -y install build-essential
apt-get -y install libssl-dev
apt-get -y install uuid-dev
apt-get -y install libgpgme-dev
apt-get -y install squashfs-tools
apt-get -y install libseccomp-dev
apt-get -y install wget
apt-get -y install pkg-config
apt-get -y install git
apt-get -y install cryptsetup-bin
apt-get -y install debootstrap
apt-get -y install uidmap
mkdir -p /tmp/go
cd /tmp/go
export CGO_ENABLED=0
wget https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz
tar -xf go1.4-bootstrap-20171003.tar.gz
mv go 1.4
cd 1.4/src
./make.bash
export GOROOT_BOOTSTRAP='/tmp/go/1.4'
cd /tmp/go
export GO_VERSION='1.15.6'
export CGO_ENABLED=1
git clone https://go.googlesource.com/go "${GO_VERSION}"
cd "${GO_VERSION}"
git checkout "go${GO_VERSION}"
cd src
./all.bash
export GOROOT="/tmp/go/${GO_VERSION}"
export PATH="${GOROOT}/bin:${PATH}"
cd /tmp
export SINGULARITY_VERSION='3.5.3'
# Installing Singularity
wget "https://github.com/hpcng/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-${SINGULARITY_VERSION}.tar.gz"
tar -xf "singularity-${SINGULARITY_VERSION}.tar.gz"
cd singularity
./mconfig #--prefix=/opt/singularity
make -C ./builddir
make -C ./builddir install
# Cleanup
apt-get -y autoremove --purge
apt-get -y clean
# Update database for mlocate
updatedb
%files
%runscript
%test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment