Skip to content

Instantly share code, notes, and snippets.

@nr23730
Created October 27, 2020 14:58
Show Gist options
  • Save nr23730/0660deda30bcac7c25d8077a2fc9d6cd to your computer and use it in GitHub Desktop.
Save nr23730/0660deda30bcac7c25d8077a2fc9d6cd to your computer and use it in GitHub Desktop.
Install Singularity on Debian based systems like Debian, Ubuntu, Mint, etc. that use apt as package manager.
#!/bin/bash
export GOVERSION=1.15.3
export SINGULARITYVERSION=3.6.4
sudo apt-get update && sudo apt-get install -y \
build-essential \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup-bin
wget https://golang.org/dl/go$GOVERSION.linux-amd64.tar.gz
tar -C /usr/local -xzvf go$GOVERSION.linux-amd64.tar.gz && \
rm go$GOVERSION.linux-amd64.tar.gz
echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \
echo 'export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin' >> ~/.bashrc
export GOPATH=${HOME}/go
export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin
source ~/.bashrc && \
wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITYVERSION}/singularity-${SINGULARITYVERSION}.tar.gz && \
tar -xzf singularity-${SINGULARITYVERSION}.tar.gz && \
cd singularity
./mconfig && \
make -C ./builddir && \
make -C ./builddir install
cd .. && \
rm -rf singularity singularity-$SINGULARITYVERSION.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment