Vagrantfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.provider :libvirt do |libvirt|
  10. libvirt.cpus = 4
  11. libvirt.memory = 8192
  12. end
  13. config.vm.provision "shell", inline: <<-SHELL
  14. # Install singularity dependencies
  15. apt-get update
  16. apt-get install -y \
  17. build-essential \
  18. libssl-dev \
  19. uuid-dev \
  20. libgpgme11-dev \
  21. squashfs-tools \
  22. libseccomp-dev \
  23. wget \
  24. pkg-config \
  25. git \
  26. cryptsetup \
  27. golang
  28. apt-get clean
  29. # Get singularity release
  30. export VERSION=3.8.0
  31. wget https://github.com/hpcng/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz
  32. tar -xzf singularity-${VERSION}.tar.gz
  33. # Build/install singularity
  34. cd singularity-${VERSION}
  35. ./mconfig
  36. make -C builddir
  37. make -C builddir install
  38. cd ../
  39. rm -r singularity-${VERSION} singularity-${VERSION}.tar.gz
  40. SHELL
  41. end