Enroot
Enroot is a tool built by NVIDIA to run containers on Linux. Enroot is targetted for HPC environments with integration with the Slurm scheduler, but can also be used as a standalone tool to run containers as an unprivileged user. This is similar to Singularity, but with the added benefit of allowing users to read/write in the container and also to appear as a root user within the container environment.
Compiling and installing enroot
At the time of writing, there is no precompiled EL8-based version of Enroot from the releases page. Fortunately, the enroot RPM packages can be built relatively easily. On a RHEL8-based system, this should build the RPMs.
# yum install -y rpm-build rpmlint libtool git libcap libtool automake jq squashfs-tools parallel fuse-overlayfs pigz squashfuse
# cd /
# git clone --recurse-submodules https://github.com/NVIDIA/enroot.git
# cd /enroot
## for hardened mode, use: make rpm PACKAGE=enroot-hardened
# CPPFLAGS="-DALLOW_SPECULATION -DINHERIT_FDS" make rpm
# ls /enroot/pkg/rpm/RPMS/x86_64/enroot*rpm
If desired, you can also build the enroot-hardened version of the package. The hardened version contains security mitigations against spectre-based exploits.
When installing Enroot, you can choose to use either the standard or the +caps version. The +caps version also contains additional capabilities for unprivileged users to import and convert container images which is handy for a HPC-based environment.
Configuration
Enroot has a configuration directory at /etc/enroot. The main configuration file is at /etc/enroot/enroot.conf.
Things that you might want to change a
- e environment variable when l
ENROOT_MOUNT_HOMEto yes