-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall_singularity.sh
executable file
·56 lines (48 loc) · 1.64 KB
/
install_singularity.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
if false; then
echo "Installing dependencies"
sudo apt-get update && sudo apt-get install -y \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
pkg-config
fi
if false; then
echo "Installing GO"
export VERSION=1.13.5 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
go get -u github.com/golang/dep/cmd/dep
fi
echo "Check for old version ????"
if [ -e /usr/local/bin/singularity ]; then
echo "Removing old version"
sudo rm -rf \
/usr/local/libexec/singularity \
/usr/local/var/singularity \
/usr/local/etc/singularity \
/usr/local/bin/singularity \
/usr/local/bin/run-singularity \
/usr/local/etc/bash_completion.d/singularity
fi
echo "Installing Singularity"
export VERSION=3.5.2 && # adjust this as necessary \
mkdir -p $GOPATH/src/github.com/sylabs && \
cd $GOPATH/src/github.com/sylabs && \
wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \
tar -xzf singularity-${VERSION}.tar.gz && \
cd ./singularity && \
./mconfig
echo "Making ..."
make -C ./builddir && \
sudo make -C ./builddir install
echo "Bash integration"
. /usr/local/etc/bash_completion.d/singularity
echo "Complete"