packaged by Chainguard
Catalog Starter gives your team 5 production-grade container images, free forever, with no contract or sales call. Sign up with your work email.
Try Starter for freeChainguard Harness uses frontier models from Anthropic, OpenAI, and Google to attack a copy of your app built on openmpi. It finds exploitable, validated issues that SAST and DAST tools aren't built to find.
Open MPI is an open source Message Passing Interface implementation for running parallel programs across one or more compute nodes.
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev:
Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.
The Chainguard openmpi image is comparable to the upstream mcr.microsoft.com/azureml/openmpi5.0-ubuntu24.04 image, the Azure Machine Learning base image for MPI workloads. Open MPI is an open source implementation of the Message Passing Interface (MPI) standard, written in C and licensed under a BSD-3-Clause-style license.
Like the upstream image, this image:
root with /bin/bash as the default command. It sets the same environment variables: PATH, LANG, LC_ALL, DEBIAN_FRONTEND, SVDIR and WORKER_TIMEOUT./usr/local/openmpi/bin, first on PATH. Its configuration files, headers and libraries are in /usr/local/openmpi/etc, /usr/local/openmpi/include and /usr/local/openmpi/lib. These paths link to the Open MPI, PRRTE, PMIx, hwloc and libevent packages, which are installed under /usr./opt/miniconda, so conda env create, conda run and conda activate work as they do upstream. For conda activate, first run source /opt/miniconda/etc/profile.d/conda.sh.mpirun can start ranks on other hosts over ssh, with --host or a hostfile.make, git, curl, wget and the common command-line utilities./var/runit: runit services for the inference server (gunicorn), nginx and rsyslog. Nothing in the image starts these services. Azure Machine Learning starts them with runsvdir /var/runit when it serves an online endpoint from an environment built on this image.Differences from the upstream image:
apt. /bin/sh is Bash rather than Dash.libmpi.so.40 library. It uses the system PRRTE, PMIx, hwloc and libevent packages rather than bundled copies. /usr/local/openmpi/include and /usr/local/openmpi/lib have the PRRTE, PMIx and hwloc headers and development libraries, but not libevent's.mpicc, compiles C as C23 (-std=gnu23), whereas the upstream image's GCC defaults to C17. To build older C code that doesn't compile as C23, such as code that defines its own bool, add -std=gnu17. This GCC also rejects implicit function declarations, implicit int and incompatible pointer types, which the upstream image's GCC only warns about; add -fpermissive to build code that relies on them./opt/miniconda base environment is the image's Python 3.12, the same Python version as upstream's Miniconda, rather than a Miniconda install.defaults channel and accepts Anaconda's terms of service in the image. To use that channel, name it in your conda file or on the command line.sshd, as the example below does.5001, 8883 and 8888, but only 5001 is in use: nginx listens on it once the runit services start. Publish the ports you need with -p.libunwind8 and libxml++2.6, and the services Ubuntu installs alongside rsyslog and runit, such as systemd, cron and logrotate.Print the Open MPI version. Like the upstream image, this image runs as root, and mpirun refuses to start as root unless you pass --allow-run-as-root:
Create a simple MPI program in the current directory:
Compile it with mpicc and run it across four ranks inside a single container. Running as your own user ID keeps the output binary writable on the bind mount, and a non-root user doesn't need --allow-run-as-root:
mpirun starts ranks on other hosts over ssh. This example runs two containers as nodes on a Docker network and starts two ranks on each of them from a third container. A shared volume holds the program and an SSH key pair. The keys are ECDSA, so the same steps work on the openmpi-fips image.
Create the network and the volume, then build the program and the key pair into the volume:
Start the two nodes. Each one trusts the public key, generates a host key and runs sshd:
Start four ranks, two on each node. The program doesn't read standard input, so --stdin none stops mpirun from forwarding it to rank 0:
Each rank prints one line, in any order:
To serve an online endpoint from an environment built on this image, Azure Machine Learning creates a conda environment from the deployment's conda file. It then starts the runit services with conda run -n <environment> runsvdir /var/runit. You can run the same steps locally.
Create a scoring script and a conda file that installs the inference server:
Start the container. It creates the environment and then starts the services:
Creating the environment takes a few minutes. Once curl http://localhost:5001/ responds, send a scoring request:
The inference server returns the scoring script's result:
The following one-shot Job compiles and runs the same program in a single pod. It runs the image as the non-root user 65532 under the restricted Pod Security Standard. First, store the source file from the previous steps in a ConfigMap:
Create the manifest as openmpi-hello.yaml. The Job mounts the ConfigMap at /src and builds the program in /tmp:
Apply it and read the output:
PATH=/usr/local/openmpi/bin:/opt/miniconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binLANG=C.UTF-8 and LC_ALL=C.UTF-8DEBIAN_FRONTEND=noninteractiveSVDIR=/var/runit and WORKER_TIMEOUT=300, which configure the runit servicesroot by default, so pass --allow-run-as-root to mpirun, as on the upstream image. To run as another user instead, pass -u to docker run, or set runAsUser in Kubernetes. Any mounted directory that your MPI application writes to must be writable by that user.OMPI_MCA_* environment variables, --mca flags to mpirun, or /usr/local/openmpi/etc/openmpi-mca-params.conf.sshd needs host keys. The image ships none, so generate them, or mount your own into /etc/ssh, before you start it.Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.
All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.
In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.
Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.
To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.
To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:
( Artistic-1.0-Perl
( GPL-2.0-or-later
(Apache-2.0
(MPL-2.0
Apache-2.0
Artistic-1.0-Perl
BSD-1-Clause
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementChainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.
SLSA compliance at ChainguardThis image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.
PCI DSS at ChainguardA FIPS validated version of this image is available for FedRAMP compliance. STIG is included with FIPS image.