-
Notifications
You must be signed in to change notification settings - Fork 31
/
Vagrantfile
69 lines (62 loc) · 1.89 KB
/
Vagrantfile
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 3
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update && apt-get install --no-install-recommends -y \
bison \
build-essential \
ca-certificates \
cmake \
cryptsetup \
curl \
flex \
g++-multilib \
gcc-multilib \
git \
libgpgme11-dev \
libseccomp-dev \
libssl-dev \
locales \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-venv \
scons \
software-properties-common \
squashfs-tools \
tzdata \
unzip \
uuid-dev \
vim \
wget
pip3 install --upgrade pip
# install go to build singularity
export VERSION=1.13 OS=linux ARCH=amd64
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz
tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz
rm go$VERSION.$OS-$ARCH.tar.gz
export GOPATH="${HOME}/go"
export PATH="/usr/local/go/bin:${PATH}:${GOPATH}/bin"
# get a recent version of singularity
export VERSION=3.5.0
wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \
tar -xzf singularity-${VERSION}.tar.gz
cd singularity
./mconfig
make -C ./builddir
make -C ./builddir install
cd ..
rm -rf singularity
rm singularity-${VERSION}.tar.gz
echo '. /usr/local/etc/bash_completion.d/singularity' >> /home/vagrant/.bashrc
# install & setup the planutils for the vagrant user
runuser -l vagrant -c "pip3 install --user planutils --trusted-host pypi.org --trusted-host files.pythonhosted.org"
runuser -l vagrant -c "planutils setup"
SHELL
config.ssh.forward_x11 = true
config.ssh.forward_agent = true
end