From 507f55fe6804ae2ba9e37b38786325a33c8a5724 Mon Sep 17 00:00:00 2001 From: Matthew Kirk Date: Wed, 16 Sep 2026 13:59:27 +0100 Subject: [PATCH 1/2] Remove devcontainer Dockerfiles To be replaced with specific "analysiscontainers" (name TBD) for each released version of EOS --- .../workflows/devcontainer-build+deploy.yaml | 58 ------------------- devcontainer/aarch64/Dockerfile | 25 -------- devcontainer/x86_64/Dockerfile | 22 ------- 3 files changed, 105 deletions(-) delete mode 100644 .github/workflows/devcontainer-build+deploy.yaml delete mode 100644 devcontainer/aarch64/Dockerfile delete mode 100644 devcontainer/x86_64/Dockerfile diff --git a/.github/workflows/devcontainer-build+deploy.yaml b/.github/workflows/devcontainer-build+deploy.yaml deleted file mode 100644 index b8a128c..0000000 --- a/.github/workflows/devcontainer-build+deploy.yaml +++ /dev/null @@ -1,58 +0,0 @@ -on: - push: - branches: - - 'master' - paths: - - 'devcontainer/**' - pull_request: - branches: - - 'master' - paths: - - 'devcontainer/**' - -jobs: - build: - runs-on: ubuntu-latest - name: Build & deploy ``devcontainer`` images - strategy: - fail-fast: false - matrix: - include: - - { platform: linux/amd64, arch: x86_64, tag_prefix: amd64 } - - { platform: linux/arm64, arch: aarch64, tag_prefix: aarch64 } - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: eoshep/devcontainer - tags: | - type=raw,value=${{ matrix.tag_prefix }}-{{sha}} - type=raw,value=${{ matrix.tag_prefix }}-{{date 'YYYY-MM-DD'}} - type=raw,value=${{ matrix.tag_prefix }}-latest - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: build - uses: docker/build-push-action@v3 - with: - push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - context: devcontainer/${{ matrix.arch }} - platforms: ${{ matrix.platform }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/devcontainer/aarch64/Dockerfile b/devcontainer/aarch64/Dockerfile deleted file mode 100644 index ccc7f72..0000000 --- a/devcontainer/aarch64/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM arm64v8/ubuntu:jammy -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -qq update -RUN apt-get install -y --no-install-recommends \ - python3 python3-pip tree \ - git openssh-client texlive-latex-base texlive-xetex cm-super dvipng \ - gcc g++ python3-dev -# gcc needed to build ``psutils``, which is pulled in as a dependency by one -# of the packages we install below. - -# setup analysis user -RUN useradd -ms /bin/bash analysis \ - && mkdir -p /home/analysis \ - && mkdir -p /analysis \ - && chown -R analysis:analysis /home/analysis /analysis - -# switch user -USER analysis - -# install python packages -RUN pip3 install --user --upgrade \ - argcomplete cython ipython ipykernel jupyter matplotlib nbconvert networkx numpy 'pypmc>=1.2.2' pyyaml scipy \ - termcolor wilson \ - numpy pyhf pandas cabinetry matplotlib uproot pyunfold -RUN pip3 install --user --upgrade --pre 'eoshep>=1.0.10' diff --git a/devcontainer/x86_64/Dockerfile b/devcontainer/x86_64/Dockerfile deleted file mode 100644 index 6a01d85..0000000 --- a/devcontainer/x86_64/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM amd64/ubuntu:jammy -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -qq update -RUN apt-get install -y --no-install-recommends \ - python3 python3-pip tree \ - git openssh-client texlive-latex-base texlive-xetex cm-super dvipng - -# setup analysis user -RUN useradd -ms /bin/bash analysis \ - && mkdir -p /home/analysis \ - && mkdir -p /analysis \ - && chown -R analysis:analysis /home/analysis /analysis - -# switch user -USER analysis - -# install python packages -RUN pip3 install --user --upgrade \ - argcomplete cython ipython ipykernel jupyter matplotlib nbconvert networkx numpy 'pypmc>=1.2.2' pyyaml scipy \ - termcolor wilson \ - numpy pyhf pandas cabinetry matplotlib uproot pyunfold -RUN pip3 install --user --upgrade 'eoshep>=1.0.10' From cd62cb14026eb627880ef317f9aa025741cec3ec Mon Sep 17 00:00:00 2001 From: Matthew Kirk Date: Wed, 16 Sep 2026 14:54:56 +0100 Subject: [PATCH 2/2] Add Dockerfile and workflow for building "release-base" images Basically a copy of the manylinux workflow and dev container Dockerfile. To be used in the main repo to build docker images with specific EOS releases --- .../workflows/release-base-build+deploy.yaml | 112 ++++++++++++++++++ release-base/aarch64/Dockerfile | 14 +++ release-base/x86_64/Dockerfile | 14 +++ 3 files changed, 140 insertions(+) create mode 100644 .github/workflows/release-base-build+deploy.yaml create mode 100644 release-base/aarch64/Dockerfile create mode 100644 release-base/x86_64/Dockerfile diff --git a/.github/workflows/release-base-build+deploy.yaml b/.github/workflows/release-base-build+deploy.yaml new file mode 100644 index 0000000..809965f --- /dev/null +++ b/.github/workflows/release-base-build+deploy.yaml @@ -0,0 +1,112 @@ +on: + push: + branches: + - 'master' + paths: + - 'release-base/**' + pull_request: + branches: + - 'master' + paths: + - 'release-base/**' + +jobs: + build: + name: Build & deploy ``release-base`` images + strategy: + fail-fast: false + matrix: + include: + - { platform: linux/amd64, arch: x86_64, runner: ubuntu-24.04 } + - { platform: linux/arm64, arch: aarch64, runner: ubuntu-24.04-arm } + runs-on: ${{ matrix.runner }} + steps: + - + name: Checkout + uses: actions/checkout@v7 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v6 + with: + images: eoshep/release-base + tags: | + type=raw,value={{date 'YYYY-MM-DD'}}-{{sha}} + type=raw,value=latest + - + name: Set up QEMU + uses: docker/setup-qemu-action@v4 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + - + name: Login to DockerHub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: build + uses: docker/build-push-action@v7 + with: + push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + context: release-base/${{ matrix.arch }} + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=eoshep/release-base,push-by-digest=true,name-canonical=true,push=true + - + name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - + name: Upload digest + uses: actions/upload-artifact@v7 + with: + name: digest-${{ matrix.arch }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - + name: Download digests + uses: actions/download-artifact@v8 + with: + pattern: digest-* + path: /tmp/digests + merge-multiple: true + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v6 + with: + images: eoshep/release-base + tags: | + type=raw,value={{date 'YYYY-MM-DD'}}-{{sha}} + type=raw,value=latest + - + name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'eoshep/release-base@sha256:%s ' *) + - + name: Inspect image + run: | + docker buildx imagetools inspect eoshep/release-base:${{ steps.meta.outputs.version }} diff --git a/release-base/aarch64/Dockerfile b/release-base/aarch64/Dockerfile new file mode 100644 index 0000000..387985e --- /dev/null +++ b/release-base/aarch64/Dockerfile @@ -0,0 +1,14 @@ +FROM arm64v8/ubuntu:resolute-20260912 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get -qq update +RUN apt-get install -y python3 python3-venv \ + texlive-latex-base \ + texlive-latex-extra cm-super dvipng + +# switch to ubuntu user and setup python virtual environment +USER ubuntu +ENV VIRTUAL_ENV=/home/ubuntu/.venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +# install / upgrade pip and wheel +RUN pip3 install --upgrade pip wheel diff --git a/release-base/x86_64/Dockerfile b/release-base/x86_64/Dockerfile new file mode 100644 index 0000000..630dde2 --- /dev/null +++ b/release-base/x86_64/Dockerfile @@ -0,0 +1,14 @@ +FROM amd64/ubuntu:resolute-20260912 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get -qq update +RUN apt-get install -y python3 python3-venv \ + texlive-latex-base \ + texlive-latex-extra cm-super dvipng + +# switch to ubuntu user and setup python virtual environment +USER ubuntu +ENV VIRTUAL_ENV=/home/ubuntu/.venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +# install / upgrade pip and wheel +RUN pip3 install --upgrade pip wheel