Skip to content

Instantly share code, notes, and snippets.

@cory-weller
Last active June 9, 2023 13:48
Show Gist options
  • Select an option

  • Save cory-weller/999ceb5dc7520e00ee84d0acce93a033 to your computer and use it in GitHub Desktop.

Select an option

Save cory-weller/999ceb5dc7520e00ee84d0acce93a033 to your computer and use it in GitHub Desktop.
Commands to install singularity on google cloud VM
#!/usr/bin/env bash
# Installs singularity
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
export GOVERSION=1.17.3 OS=linux ARCH=amd64
rm -rf /usr/local/go
wget -O /tmp/go${GOVERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/go${GOVERSION}.${OS}-${ARCH}.tar.gz
sudo tar -C /usr/local -xzf /tmp/go${GOVERSION}.${OS}-${ARCH}.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
. ~/.bashrc
git clone https://github.com/hpcng/singularity.git
cd singularity
git checkout v3.8.4
./mconfig
cd ./builddir
make
sudo make install
cd && sudo rm -rf singularity go
Bootstrap: docker
From: ubuntu:20.04
%post
apt-get -y update && apt-get install -y vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment