-
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.
- Loading branch information
Showing
2 changed files
with
71 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 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 |
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,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 | ||
|