NERSC / podman-hpc

Other
34 stars 5 forks source link

Podman-HPC

Podman-HPC (podman-hpc) is a wrapper script around the Pod Manager (podman) container engine, which provides HPC configuration and infrastructure for the Podman ecosystem at NERSC.

Configuration

The wrapper can be configured through a configuration file and environment variables. The order of precedence from lowest to highest is:

  1. built-in defaults
  2. configuration file template (if a template is allowed)
  3. environment variable template (if a template is allowed)
  4. configuration file
  5. enviornment variables

The enviornment variable override is the configuration parameter in upper case prefixed with PODMANHPC_ (e.g. podman_bin becomes PODMANHPC_PODMAN_BIN).

The list of configurable values is:

Templating

Some parameters can be set using a template. The template is set by the parameter with _template appended to the parameter to be templated (e.g. graph_root_template would be used to generate the value for the graph_root parameter).

The template replaces strings with {{ variable }} with the approriate value. The following variables are supported.

Prerequisites

  1. podman should be installed separately, per the instructions at https://podman.io/
  2. User namespaces and, ideally, subuid/gid support should be enabled for the users. This typically requires some local customization for managing this configuration.

Site Installation

It is recommended that podman-hpc is installed site-wide in a multi-user HPC center. To build and deploy an RPM using this repo:

  1. git clone https://github.com/NERSC/podman-hpc
  2. cd podman-hpc
  3. ./rpmsrcprep.sh
  4. rpmbuild -ba podman-hpc.spec
  5. Deploy resulting RPM as usual.
  6. (Optional) Add/edit site modules as required in /etc/podman_hpc/modules.d

Developer Installation

The podman-hpc package is bundled as a python package and may be installed in an isolated python environment for development or testing.

  1. git clone https://github.com/NERSC/podman-hpc
  2. cd podman-hpc
  3. pip install .
  4. python -m podman_hpc.configure_hooks
  5. (Optional) Add/edit site modules as required in <podman-hpc python sys.prefix>/etc/podman_hpc/modules.d