NVIDIA / enroot

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

Enroot installation on Alinux2 #202

Open hgreebe opened 3 months ago

hgreebe commented 3 months ago

Is it possible to install enroot with a Alinux2 OS. Some of the runtime dependencies such as fuse-overlayfs do not exist in the alinux2 repo.

Additionally the installation doc only gives a download link for el8 and not el7: https://github.com/NVIDIA/enroot/releases/download/v3.5.0/enroot-3.5.0-1.el8.${arch}.rpm

So I was wondering if enroot could be used with the Alinux2 OS.

flx42 commented 3 months ago

I don't think we have tested Alinux2 recently, but fuse-overlayfs is an optional dependency so that's fine on this side.

From a quick experiment within a amazonlinux:2 container, it works fine when using the published el8 enroot package:

$ docker run --privileged -ti amazonlinux:2

bash-4.2# amazon-linux-extras install epel -y

bash-4.2# yum install -y jq squashfs-tools parallel parallel gzip shadow-utils tar util-linux zstd procps

bash-4.2# curl -fSsL -OO https://github.com/NVIDIA/enroot/releases/download/v3.5.0/{enroot-3.5.0-1.el8.x86_64.rpm,enroot+caps-3.5.0-1.el8.x86_64.rpm}

bash-4.2# rpm -i enroot-3.5.0-1.el8.x86_64.rpm enroot+caps-3.5.0-1.el8.x86_64.rpm

bash-4.2# enroot import docker://ubuntu:22.04

bash-4.2# enroot create ubuntu+22.04.sqsh

bash-4.2# enroot start ubuntu+22.04 cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
moriahc commented 2 months ago

This installs enroot with fuse-overlayfs on alinux2. https://github.com/aws-samples/aws-parallelcluster-post-install-scripts/blob/ec4d6368112f6504117a9235663a1c88594322e1/pyxis/postinstall.sh#L58