mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
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)
132 lines
3 KiB
YAML
132 lines
3 KiB
YAML
|
|
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
|
|
python-packages:
|
|
|
|
name: Release Python packages
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
environment:
|
|
name: release
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get version
|
|
id: version
|
|
run: echo VERSION=$(git describe --exact-match --tags | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
|
|
- name: Install dependencies
|
|
run: pip install build wheel
|
|
|
|
- name: Build packages
|
|
run: make packages VERSION=${{ steps.version.outputs.VERSION }}
|
|
|
|
- name: Publish release distributions to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
build-platform-image:
|
|
|
|
name: Build ${{ matrix.container }} (${{ matrix.platform }})
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
environment:
|
|
name: release
|
|
strategy:
|
|
matrix:
|
|
container:
|
|
- 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:
|
|
|
|
- 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: Build container
|
|
run: make platform-${{ matrix.container }}-${{ matrix.platform }} VERSION=${{ steps.version.outputs.VERSION }}
|
|
|
|
- name: Push container
|
|
run: make push-platform-${{ matrix.container }}-${{ matrix.platform }} 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 }}
|