Requirements

This page documents the requirements and dependencies needed by Sarus. It serves both as a general reference and as preliminary step to performing installations from source.

The Spack package manager is able to build or retrieve software dependencies on its own: as such, when using Spack, the only requirements to satisfy from this page are those related to the operating system.

Operating System

  • Linux kernel >= 3.0

  • util-linux >= 2.20 (these utilities are usually bundled with the Linux distribution itself; v2.20 was released in August 2011)

  • The following kernel modules loaded:

    • loop

    • squashfs

    • overlayfs

These requirements are tracked by the CI/check_host.sh script.

System packages

The required packages for building Sarus are listed below for a selection of popular Linux distributions. Please note that, depending on the distribution, not all dependencies might be available through the system's package manager, or some dependencies might be provided in versions not supported by Sarus. Please follow the manual installation instructions for such dependencies.

Important

Please note that when building on ARM architecture, Boost version 1.77.x or later is required.

# Install packages
sudo zypper install -y gcc-c++ glibc-static wget which git gzip bzip2 tar \
    make autoconf automake squashfs cmake zlib-devel zlib-devel-static \
    runc tini-static skopeo umoci \
    libboost_filesystem1_75_0-devel \
    libboost_regex1_75_0-devel \
    libboost_program_options1_75_0-devel \
    python3 python3-pip python3-setuptools
sudo zypper clean --all

Manual installation

This section provides instructions to install some notable Sarus dependencies which might not be available through the system's package manager, or might be provided in a version not supported by Sarus.

Boost libraries

Boost libraries are required to be version 1.60.x or later. The recommended version, which is used routinely for build integration and testing, is 1.77.x.

It is especially important to note that when building on ARM architecture, Boost version 1.77.x or later is required.

Note

The following instructions will default to /usr/local as the installation prefix. To install to a specific location, use the --prefix option of the b2 builder/installer tool.

pwd_bak=$PWD

# Install boost
cd /tmp && \
    mkdir -p boost/1_77_0 && cd boost/1_77_0 && \
    wget https://downloads.sourceforge.net/project/boost/boost/1.77.0/boost_1_77_0.tar.bz2 && \
    tar xf boost_1_77_0.tar.bz2 && \
    mv boost_1_77_0 src && cd src && \
    ./bootstrap.sh && \
    sudo ./b2 -j$(nproc) \
        --with-filesystem \
        --with-regex \
        --with-program_options \
        install && \
    cd ${pwd_bak} && \
    rm -rf /tmp/boost

Skopeo

Skopeo is used to acquire images and their metadata from a variety of sources. Versions 1.7.0 or later are recommended for improved performance when pulling or loading images.

Up-to-date instructions about building Skopeo from source are available on the project's GitHub repository.

Umoci

Umoci is used to unpack OCI images' filesystem contents before converting them into the SquashFS format:

pwd_bak=$PWD

# Install umoci
cd /tmp && \
    wget -O umoci https://github.com/opencontainers/umoci/releases/download/v0.4.7/umoci.amd64 && \
    chmod 755 umoci && \
    sudo mv umoci /usr/local/bin/ && \
    sudo chown root:root /usr/local/bin/umoci && \
    cd ${pwd_bak}

OCI-compliant runtime

Sarus internally relies on an OCI-compliant runtime to spawn a container.

Here we will provide some indications to install runc, the reference implementation from the Open Container Initiative. The recommended version is v1.1.12.

Important

Due to the changes and hardening measures it introduces, runc 1.1.12 is not compatible with Sarus (and its hooks) versions 1.6.2 and earlier.

Sarus 1.6.3 and later should be used alongside runc 1.1.12.

The simplest solution is to download a pre-built binary release from the project's GitHub page:

pwd_bak=$PWD

# Install runc
cd /tmp && \
    wget -O runc.amd64 https://github.com/opencontainers/runc/releases/download/v1.1.12/runc.amd64 && \
    chmod 755 runc.amd64 && \
    sudo mv runc.amd64 /usr/local/bin/ && \
    sudo chown root:root /usr/local/bin/runc.amd64 && \
    cd ${pwd_bak}

Alternatively, you can follow the instructions to build from source, which allows more fine-grained control over runc's features, including security options.

Init process

Sarus can start an init process within containers in order to reap zombie processes and allow container applications to receive signals.

Here we will provide some indications to install tini, a very lightweight init process which is also used by Docker. The recommended version is v0.19.0.

The simplest solution is to download a pre-built binary release from the project's GitHub page:

pwd_bak=$PWD

# Install tini
cd /tmp && \
    wget -O tini-static-amd64 https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-amd64 && \
    chmod 755 tini-static-amd64 && \
    sudo mv tini-static-amd64 /usr/local/bin/ && \
    sudo chown root:root /usr/local/bin/tini-static-amd64 && \
    cd ${pwd_bak}

Alternatively, you can follow the instructions to build from source.

Python packages for integration tests

The following Python 3 packages are required if you are interested to also run the integration tests:

$ pip3 install setuptools
$ pip3 install pytest gcovr pexpect