Skip to content

Commit

Permalink
add nersc exact version
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Sep 4, 2024
1 parent 72fe061 commit d1a49bc
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-basic-nersc-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build NERSC Version

on: workflow_dispatch

jobs:
build:
name: Build Basic NERSC 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: ./mpi4py-nersc-version
file: ./mpi4py-nersc-version/Dockerfile
push: true
tags: ghcr.io/lsstdesc/mpi4py-nersc-version
cache-from: type=gha
cache-to: type=gha,mode=max
31 changes: 31 additions & 0 deletions mpi4py-nersc-version/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:latest
WORKDIR /opt

RUN \
apt-get update && \
apt-get install --yes \
build-essential \
gfortran \
python3-dev \
python3-pip \
wget && \
apt-get clean all

ARG mpich=4.0.2
ARG mpich_prefix=mpich-$mpich

RUN \
wget https://www.mpich.org/static/downloads/$mpich/$mpich_prefix.tar.gz && \
tar xvzf $mpich_prefix.tar.gz && \
cd $mpich_prefix && \
./configure && \
make -j 4 && \
make install && \
make clean && \
cd .. && \
rm -rf $mpich_prefix

RUN /sbin/ldconfig

RUN python3 -m pip install mpi4py

0 comments on commit d1a49bc

Please sign in to comment.