Skip to content
Open
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
30 changes: 24 additions & 6 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
description: 'Force full rebuild (no cache)'
type: boolean
default: false
release:
types: [published]

jobs:
build-and-push:
Expand All @@ -35,11 +37,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Extract branch name
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
#- name: Extract branch name
# run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/underworldcode/underworld3
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Login to GHCR
uses: docker/login-action@v3
Expand All @@ -54,8 +68,12 @@ jobs:
context: .
push: true
file: container/Containerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
no-cache: ${{ inputs.force_rebuild || false }}
tags: |
ghcr.io/underworldcode/underworld3:${{ env.BRANCH }}
ghcr.io/underworldcode/underworld3:latest
build-args: |
SETUPTOOLS_SCM_PRETEND_VERSION=${{ steps.meta.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# tags: |
# ghcr.io/underworldcode/underworld3:${{ env.BRANCH }}
# ghcr.io/underworldcode/underworld3:latest
11 changes: 8 additions & 3 deletions container/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,21 @@ RUN micromamba install -y -v -n base -f /tmp/env.yaml && \
# activate mamba env during podman build
ARG MAMBA_DOCKERFILE_ACTIVATE=1

# pyvista - taken from pyvista docker files
# pyvista - vtk-osmesa only available for amd64; arm64 falls back to conda-forge vtk
# see https://github.com/pyvista/pyvista/tree/main/docker
RUN pip install --no-cache-dir --extra-index-url https://wheels.vtk.org vtk-osmesa
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; then \
pip install --no-cache-dir --extra-index-url https://wheels.vtk.org vtk-osmesa; \
fi

# install UW3
COPY --chown=$MAMBA_USER:$MAMBA_USER \
--exclude=**/.git \
. /home/$MAMBA_USER/underworld3
WORKDIR /home/$MAMBA_USER/underworld3
RUN pip install --no-build-isolation --no-cache-dir .
ARG SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0+unknown
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION} \
pip install --no-build-isolation --no-cache-dir .

# allow jupyterlab for ipyvtk
ENV PYVISTA_OFF_SCREEN=true
Expand Down
2 changes: 0 additions & 2 deletions src/underworld3/_version.py

This file was deleted.

Loading