This is a simple bash script to install Singularity.
- Go
>= 1.11
build-essential
libssl-dev
uuid-dev
libgpgme11-dev
squashfs-tools
libseccomp-dev
pkg-config
This is a simple bash script to install Singularity.
>= 1.11
build-essential
libssl-dev
uuid-dev
libgpgme11-dev
squashfs-tools
libseccomp-dev
pkg-config
#!/usr/bin/env bash | |
# Check if we have 2 parameters (i.e., version AND path name) | |
if [ "$#" == 2 ] | |
then | |
export VERSION=$1 && | |
export PATHVERSION=$2 | |
# If we have only one parameter (i.e., only version number) | |
elif [ "$#" == 1 ] | |
then | |
export VERSION=$1 && | |
export PATHVERSION=$1 | |
# Else display some help text and exit | |
else | |
echo "Usage:" | |
echo " ./install-release [version number] [optional: path name w/out 'v' (if different from version number)]" | |
echo "" | |
echo "Example: For 'https://github.com/sylabs/singularity/releases/download/v3.3.0-rc.1/singularity-3.3.0.tar.gz', use:" | |
echo " ./install-release.sh 3.3.0 3.3.0-rc.1" | |
exit 0 | |
fi | |
echo "Installing Singularity version $1" | |
# Get local dir and save in variable | |
DIR=$(pwd) && \ | |
# Get Singularity relesae from GitHub | |
mkdir -p $DIR/src/github.com/sylabs && \ | |
cd $DIR/src/github.com/sylabs && \ | |
wget https://github.com/sylabs/singularity/releases/download/v${PATHVERSION}/singularity-${VERSION}.tar.gz && \ | |
tar -xzf singularity-${VERSION}.tar.gz && \ | |
cd ./singularity && \ | |
# Configure make | |
./mconfig && \ | |
# Make build | |
make -C ./builddir && \ | |
# Install | |
sudo make -C ./builddir install | |
exit 0 |