Skip to content

Commit

Permalink
add way to generate min failing image
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Sep 3, 2024
1 parent 4a30c78 commit 4d3bdfb
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-min-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Minimum Failing Image

on: workflow_dispatch

jobs:
build:
name: Build Image
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4


- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3


- name: Build & Push Docker image
uses: docker/build-push-action@v5
with:
context: ./txpipe-min-failing
file: ./txpipe-min-failing/Dockerfile
push: true
tags: ghcr.io/lsstdesc/mpi4py-min-failing
cache-from: type=gha
cache-to: type=gha,mode=max
33 changes: 33 additions & 0 deletions txpipe-min-failing/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM condaforge/mambaforge:24.3.0-0

# This is matching what the NERSC docs use
ENV MPI_VERSION=4.0.2

# Show some linux version info
RUN cat /etc/*-release

# Install make
RUN apt-get update -y \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y make \
&& apt-get clean all

# We need a C compiler temporarily to install MPICH.
# Then we install following instructions at
# https://docs.nersc.gov/development/containers/shifter/how-to-use/#using-mpi-in-shifter
RUN apt-get update -y \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y gcc gfortran \
&& mkdir /opt/mpich \
&& cd /opt/mpich \
&& wget http://www.mpich.org/static/downloads/${MPI_VERSION}/mpich-${MPI_VERSION}.tar.gz \
&& tar xvzf mpich-${MPI_VERSION}.tar.gz \
&& cd mpich-${MPI_VERSION} \
&& ./configure --disable-wrapper-rpath --disable-cxx --with-device=ch3 && make \
&& make install \
&& rm -rf /opt/mpich \
&& apt-get remove --purge -y gcc gfortran

RUN /sbin/ldconfig

# check we are using the conda python
RUN which python3
RUN python3 -m pip install mpi4py

0 comments on commit 4d3bdfb

Please sign in to comment.