Add singularity build deps libglib2.0-dev and libseccomp-dev to packer
[arvados.git] / tools / compute-images / scripts / base.sh
index d186f4c52e57ce39d52484a5954edeb2d84ba530..38bbac88a2473fd05c7d829a3ad05318dee3d4b3 100644 (file)
@@ -69,7 +69,9 @@ wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes ins
   lvm2 \
   cryptsetup \
   xfsprogs \
-  squashfs-tools
+  squashfs-tools \
+  libglib2.0-dev \
+  libseccomp-dev
 
 # Install the Arvados packages we need
 wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes install \
@@ -120,7 +122,7 @@ rm -rf /var/lib/arvados/go/
 curl -s https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz | tar -C /var/lib/arvados -xzf -
 ln -sf /var/lib/arvados/go/bin/* /usr/local/bin/
 
-singularityversion=3.9.9
+singularityversion=3.10.4
 curl -Ls https://github.com/sylabs/singularity/archive/refs/tags/v${singularityversion}.tar.gz | tar -C /var/lib/arvados -xzf -
 cd /var/lib/arvados/singularity-${singularityversion}
 
@@ -149,8 +151,8 @@ wait_for_apt_locks && $SUDO DEBIAN_FRONTEND=noninteractive apt-get -qq --yes rem
 $SUDO mkdir -p /etc/arvados/docker-cleaner
 $SUDO echo -e "{\n  \"Quota\": \"10G\",\n  \"RemoveStoppedContainers\": \"always\"\n}" > /etc/arvados/docker-cleaner/docker-cleaner.json
 
-# Enable cgroup accounting
-$SUDO sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"/g' /etc/default/grub
+# Enable cgroup accounting (forcing cgroups v1)
+$SUDO echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0"' >> /etc/default/grub
 $SUDO update-grub
 
 # Make sure user_allow_other is set in fuse.conf