-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add way to generate min failing image
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |