Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/actions/docker_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ runs:
echo "DOCKERHUB_ORG=${{ inputs.DOCKERHUB_ORG == '' && 'openchemistry' || inputs.DOCKERHUB_ORG }}" >> $GITHUB_ENV
shell: bash
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ inputs.DOCKERHUB_USERNAME }}
password: ${{ inputs.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
with:
driver: docker
20 changes: 5 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- 'master'

jobs:
# Builds base image for stempy of various verions if Dockerfile.base has changed
# Build the base and stempy images for each supported variant.
build-stempy:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
submodules: 'recursive'
Expand All @@ -38,15 +38,6 @@ jobs:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_ORG: ${{ vars.DOCKERHUB_ORG }}

- name: Determine if Dockerfile.base changed
id: changed-dockerfile-base
uses: tj-actions/changed-files@v46
with:
files: |
./docker/Dockerfile.base
./docker/apt-packages-common.txt
./docker/apt-packages-dev.txt

- name: Set up environment variables for python version
id: set-conda-env
run: |
Expand Down Expand Up @@ -103,8 +94,7 @@ jobs:
echo "LATEST_TAG=${LATEST_TAG}" >> $GITHUB_ENV

- name: Build/push Dockerfile.base
uses: docker/build-push-action@v6
# if: ${{ contains(github.event.head_commit.message, 'trigger-ci') || steps.changed-dockerfile-base.outputs.any_changed == 'true'}}
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: ./docker/Dockerfile.base
Expand All @@ -121,7 +111,7 @@ jobs:
docker image inspect ${{ env.BASE_TAG }}

- name: Build/push Dockerfile.stempy
uses: docker/build-push-action@v6
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: ./docker/Dockerfile.stempy
Expand Down
11 changes: 5 additions & 6 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# update to use python 3.11
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-bookworm as base
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-bookworm AS base

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /build

# Install common packages
Expand All @@ -24,7 +23,7 @@ RUN if [ "$DEV" = "dev" ]; then \
apt-get clean all && \
rm -rf /var/lib/apt/lists/*

FROM base as mpi
FROM base AS mpi

# Build mpich
ARG mpich=4.0.2
Expand All @@ -45,4 +44,4 @@ RUN cd /build && wget https://github.com/jeffhammond/BigMPI/archive/refs/heads/m
tar zxvf master.tar.gz && cd /build/BigMPI-master && \
./autogen.sh && ./configure --with-pic && make -j4 && make install && make clean && rm /build/master.tar.gz

RUN /sbin/ldconfig
RUN /sbin/ldconfig
10 changes: 5 additions & 5 deletions docker/Dockerfile.stempy
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE} as build
ARG BASE_IMAGE=openchemistry/stempy:py311-base
FROM ${BASE_IMAGE} AS build

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

ARG PYTHON_VERSION
ARG PYTHON_VERSION=3.11
ARG IPYKERNEL
ARG MPI
ARG RELEASE_OR_DEBUG
Expand Down Expand Up @@ -39,4 +39,4 @@ RUN if [ "${IPYKERNEL}" = "ipykernel" ]; then \
# Remove cmake package, as its not needed a runtime
RUN pip uninstall -y cmake

RUN /sbin/ldconfig
RUN /sbin/ldconfig
Loading