Skip to content

Commit

Permalink
Merge release v0.1.5
Browse files Browse the repository at this point in the history
Release v0.1.5
  • Loading branch information
roehrich-hpe authored Feb 6, 2025
2 parents dcee85b + 2643ec3 commit ee72dea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ on: [push]

jobs:
production:
# Testing with nektos/act:
# $ act --rm -j production --container-architecture linux/amd64 --pull=false --bind --action-offline-mode push
#
runs-on: ubuntu-latest
steps:
- name: "Build context"
run: |
echo "env.ACT is ${{ env.ACT }}"
echo "ref is ${{ github.ref }}"
echo "ref_type is ${{ github.ref_type }}"
echo "head.sha is ${{ github.event.pull_request.head.sha }}"
- name: "Checkout repository"
if: ${{ !env.ACT }} # skip during local actions testing
id: checkout_repo
uses: actions/checkout@v3
with:
Expand All @@ -33,6 +39,7 @@ jobs:
shell: bash

- name: "Docker metadata"
if: ${{ !env.ACT }} # skip during local actions testing
id: meta
uses: docker/metadata-action@v4
with:
Expand All @@ -54,6 +61,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: "Docker login"
if: ${{ !env.ACT }} # skip during local actions testing
id: docker_login
uses: docker/login-action@v2
with:
Expand All @@ -62,12 +70,23 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Build the final Docker image"
if: ${{ !env.ACT }} # skip during local actions testing
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
target: production
tags: ${{ steps.meta.outputs.tags }}

- name: "Build the final Docker image in nektos/act"
# The docker/build-push-action does actions/checkout, and that can't be
# turned off. So instead, we run the docker build command directly here
# assuming that 'act' was run with the '--bind' arg.
if: ${{ env.ACT }} # only during local actions testing
id: docker_build_nektos_act
run: /usr/bin/docker buildx build --tag ghcr.io/${{ env.REPO_NAME }}:act --target production .


debug:
runs-on: ubuntu-latest
steps:
Expand Down
25 changes: 19 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2024 Hewlett Packard Enterprise Development LP
# Copyright 2021-2025 Hewlett Packard Enterprise Development LP
# Other additional copyright holders may be indicated within.
#
# The entirety of this work is licensed under the Apache License,
Expand All @@ -18,24 +18,31 @@
# These ARGs must be before the first FROM. This allows them to be valid for
# use in FROM instructions.
ARG MPI_OPERATOR_VERSION=0.6.0
# See https://www.open-mpi.org/software/ompi/v4.1/ for releases and their
# checkums.
ARG OPENMPI_VERSION=4.1.7
ARG OPENMPI_MD5=787d2bc8b3db336db97c34236934b3df

FROM mpioperator/openmpi-builder:v$MPI_OPERATOR_VERSION AS builder

ARG OPENMPI_VERSION
ARG OPENMPI_MD5
ENV OPENMPI_VERSION=$OPENMPI_VERSION
ENV OPENMPI_MD5=$OPENMPI_MD5

RUN apt-get update && apt-get install -y \
ca-certificates \
wget tar make gcc cmake perl libbz2-dev pkg-config openssl libssl-dev libcap-dev \
git libattr1-dev \
openssh-server openssh-client \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates

# Remove the OS binary of openmpi and build from source
RUN apt-get remove -y openmpi-bin
RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OPENMPI_VERSION.tar.gz \
&& gunzip -c openmpi-$OPENMPI_VERSION.tar.gz | tar xf - \
RUN wget --no-check-certificate https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OPENMPI_VERSION.tar.gz
RUN [ $(md5sum openmpi-$OPENMPI_VERSION.tar.gz | awk '{print $1}') = "$OPENMPI_MD5" ]
RUN gunzip -c openmpi-$OPENMPI_VERSION.tar.gz | tar xf - \
&& cd openmpi-$OPENMPI_VERSION \
&& ./configure --prefix=/opt/openmpi-$OPENMPI_VERSION \
&& make all install
Expand Down Expand Up @@ -86,7 +93,9 @@ RUN git clone --depth 1 https://github.com/nearnodeflash/mpifileutils.git --bran
FROM builder AS builder-debug

ARG OPENMPI_VERSION
ARG OPENMPI_MD5
ENV OPENMPI_VERSION=$OPENMPI_VERSION
ENV OPENMPI_MD5=$OPENMPI_MD5

WORKDIR /deps
RUN cd build \
Expand All @@ -99,8 +108,9 @@ RUN cd build \
&& make install


RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OPENMPI_VERSION.tar.gz \
&& gunzip -c openmpi-$OPENMPI_VERSION.tar.gz | tar xf - \
RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-$OPENMPI_VERSION.tar.gz
RUN [ $(md5sum openmpi-$OPENMPI_VERSION.tar.gz | awk '{print $1}') = "$OPENMPI_MD5" ]
RUN gunzip -c openmpi-$OPENMPI_VERSION.tar.gz | tar xf - \
&& cd openmpi-$OPENMPI_VERSION \
&& ./configure --prefix=/opt/openmpi-$OPENMPI_VERSION-debug --enable-debug \
&& make all install
Expand All @@ -125,6 +135,9 @@ RUN apt-get remove -y openmpi-bin
COPY --from=builder /opt/openmpi-$OPENMPI_VERSION /opt/openmpi-$OPENMPI_VERSION
RUN cp -r /opt/openmpi-$OPENMPI_VERSION/* /usr && rm -rf /openmpi*

# Remove timezone configuration so we can inherit from host
RUN rm -rf /etc/timezone && rm -rf /etc/localtime

# Increase the number of allowed incomming ssh connections to support many mpirun applications
# attempting to hit a mpi host/worker (i.e. rabbit node) all at once. A compute node has 192 cores,
# and each rabbit has 16 compute nodes. This means 3072 (192*16) ssh connections could come in at
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Utils](https://github.com/hpc/mpifileutils) commands.

The foundation of this image relies on
[mpi-operator](https://github.com/kubeflow/mpi-operator) with the addition of
MPI File Utils that have been constructed from source. At the time of this writing, the mpi-operator image installs v4.1.0 of Open MPI.
MPI File Utils that have been constructed from source.

This image is primarily used for NNF Data Movement and as a base image for running NNF User Containers.

Expand Down

0 comments on commit ee72dea

Please sign in to comment.