mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
Add multi-arch (amd64/arm64) container builds and parallel CI (#807)
Pull requests back-ported to release/v2.2: 801, 802, 804, 805
Restructure container builds for multi-platform support, enabling
ARM-based deployments (e.g. Apple Silicon via Docker Desktop).
Makefile:
- Replace per-container named targets with pattern rules
(container-%, manifest-%, platform-%-{amd64,arm64},
combine-manifest-%)
- Add parallel CI targets: platform builds push per-arch images,
combine-manifest creates and pushes the multi-arch manifest list
- Remove legacy cruft targets (update-dcs, update-templates)
CI (release.yaml):
- Split single deploy job into build-platform-image (16 parallel
jobs: 8 containers x 2 platforms) and combine-manifests (8 jobs,
metadata only)
- Use native ARM runners (ubuntu-24.04-arm)
Containerfile.hf:
- Downgrade to Python 3.12 (PyTorch lacks arm64 wheels for 3.13)
- Use standard PyTorch package instead of +cpu variant (no arm64 wheels
on the cpu index)
This commit is contained in:
parent
dfb6d26a56
commit
b2e69cfa48
3 changed files with 121 additions and 155 deletions
79
.github/workflows/release.yaml
vendored
79
.github/workflows/release.yaml
vendored
|
|
@ -40,10 +40,9 @@ jobs:
|
|||
- name: Publish release distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
deploy-container-image:
|
||||
build-platform-image:
|
||||
|
||||
name: Release container images
|
||||
runs-on: ubuntu-24.04
|
||||
name: Build ${{ matrix.container }} (${{ matrix.platform }})
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
|
@ -52,14 +51,24 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
container:
|
||||
- trustgraph-base
|
||||
- trustgraph-flow
|
||||
- trustgraph-bedrock
|
||||
- trustgraph-vertexai
|
||||
- trustgraph-hf
|
||||
- trustgraph-ocr
|
||||
- trustgraph-unstructured
|
||||
- trustgraph-mcp
|
||||
- base
|
||||
- flow
|
||||
- bedrock
|
||||
- vertexai
|
||||
- hf
|
||||
- ocr
|
||||
- unstructured
|
||||
- mcp
|
||||
platform:
|
||||
- amd64
|
||||
- arm64
|
||||
include:
|
||||
- platform: amd64
|
||||
runner: ubuntu-24.04
|
||||
- platform: arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
steps:
|
||||
|
||||
|
|
@ -76,12 +85,48 @@ jobs:
|
|||
id: version
|
||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Put version into package manifests
|
||||
run: make update-package-versions VERSION=${{ steps.version.outputs.VERSION }}
|
||||
- name: Build container
|
||||
run: make platform-${{ matrix.container }}-${{ matrix.platform }} VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Build container - ${{ matrix.container }}
|
||||
run: make container-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}
|
||||
- name: Push container
|
||||
run: make push-platform-${{ matrix.container }}-${{ matrix.platform }} VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
||||
- name: Push container - ${{ matrix.container }}
|
||||
run: make push-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}
|
||||
combine-manifests:
|
||||
|
||||
name: Combine manifest ${{ matrix.container }}
|
||||
runs-on: ubuntu-24.04
|
||||
needs: build-platform-image
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: release
|
||||
strategy:
|
||||
matrix:
|
||||
container:
|
||||
- base
|
||||
- flow
|
||||
- bedrock
|
||||
- vertexai
|
||||
- hf
|
||||
- ocr
|
||||
- unstructured
|
||||
- mcp
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker Hub token
|
||||
run: echo ${{ secrets.DOCKER_SECRET }} > docker-token.txt
|
||||
|
||||
- name: Authenticate with Docker hub
|
||||
run: make docker-hub-login
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Combine and push manifest
|
||||
run: make combine-manifest-${{ matrix.container }} VERSION=${{ steps.version.outputs.VERSION }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue