NVIDIA / enroot

A simple yet powerful tool to turn traditional container/OS images into unprivileged sandboxes.
Apache License 2.0
585 stars 91 forks source link

Squashfs support in --container-mount #180

Open sean-smith opened 4 months ago

sean-smith commented 4 months ago

Is it possible to expose a squashfs via the --container-mounts flag in pyxis/enroot?

3XX0 commented 4 months ago

No since this requires privileges. However:

  1. You can use squashfuse from within the container as a user to mount it
  2. As root you can use autofs and set it up for your users. For example assuming the images are stored under /data (e.g. /data/foo.sqsh):
cat <<EOF > /etc/auto.misc​
* -fstype=squashfs,loop,ro,nosuid,nodev :/data/&.sqsh​
EOF​

systemctl reload autofs

srun --container-image=... --container-mounts=/misc/foo

sean-smith commented 4 months ago

Thanks Jonathan, we have root access so will try the later.