Vagrantfile 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Vagrant.configure("2") do |config|
  2. config.vm.box = "generic/ubuntu2004"
  3. config.vm.hostname = "singularity"
  4. config.vm.synced_folder "./", "/vagrant"
  5. config.vm.provider "virtualbox" do |vb|
  6. vb.memory = "8192"
  7. vb.cpus = "4"
  8. end
  9. config.vm.provision "shell", inline: <<-SHELL
  10. # Install singularity dependencies
  11. apt-get update
  12. apt-get install -y \
  13. build-essential \
  14. libssl-dev \
  15. uuid-dev \
  16. libgpgme11-dev \
  17. squashfs-tools \
  18. libseccomp-dev \
  19. wget \
  20. pkg-config \
  21. git \
  22. cryptsetup \
  23. golang
  24. apt-get clean
  25. # Get singularity release
  26. export VERSION=3.8.0
  27. wget https://github.com/hpcng/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz
  28. tar -xzf singularity-${VERSION}.tar.gz
  29. # Build/install singularity
  30. cd singularity-${VERSION}
  31. ./mconfig
  32. make -C builddir
  33. make -C builddir install
  34. cd ../
  35. rm -r singularity-${VERSION} singularity-${VERSION}.tar.gz
  36. SHELL
  37. end