Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
34e3c81
feat(installer): add offline pack command and CI workflow
MioYuuIH Mar 4, 2026
c31a2f1
fix(pack): add IMAGE_REGISTRY support and fail on pull errors
MioYuuIH Mar 4, 2026
5dd55b9
feat(installer): add IMAGE_TAG env var for configurable image tag prefix
MioYuuIH Mar 4, 2026
f3dc904
fix(installer): fix glob quoting in load_offline_images and move regi…
MioYuuIH Mar 5, 2026
a2c1c02
fix(installer): remove traefik from EXTERNAL_IMAGES, already included…
MioYuuIH Mar 5, 2026
3e11295
fix(installer): load offline images before deploying GPU device plugin
MioYuuIH Mar 6, 2026
7895da6
fix(offline): move hub image override after custom block in values ov…
MioYuuIH Mar 6, 2026
96e08e6
fix(pack): save plain images with both :latest and :${IMAGE_TAG} tags…
MioYuuIH Mar 6, 2026
0e40738
fix(offline): fail fast when image import fails in load_offline_images
MioYuuIH Mar 6, 2026
34584d6
refactor(installer): improve code clarity and consistency
MioYuuIH Mar 6, 2026
18ca4ff
fix(ci): simplify pack-bundle workflow inputs and fix pack root check
MioYuuIH Mar 6, 2026
993c88d
fix(ci): sanitize branch name for Docker image tag
MioYuuIH Mar 6, 2026
ad57e6b
fix(ci/pack): silently sanitize IMAGE_TAG by replacing '/' with '-'
MioYuuIH Mar 6, 2026
86d3f86
ci(pack): auto-pack on release tags, matrix all GPU types
MioYuuIH Mar 6, 2026
fda559b
ci(pack): remove slow file count in verify step
MioYuuIH Mar 6, 2026
7ef70b8
ci(pack): simplify verify step to filename and size only
MioYuuIH Mar 6, 2026
7ec7d40
perf(pack): save all custom images into one tar to deduplicate shared…
MioYuuIH Mar 6, 2026
832e749
ci(pack): allow fork repo in release trigger condition
MioYuuIH Mar 9, 2026
48d83c3
ci: add type=ref,event=tag to all metadata tag lists
MioYuuIH Mar 9, 2026
0059856
ci(pack): derive IMAGE_REGISTRY from repository owner
MioYuuIH Mar 9, 2026
4afa48f
ci(pack): lowercase repository owner for image registry
MioYuuIH Mar 9, 2026
9603fac
ci(pack): continue-on-error for release asset upload
MioYuuIH Mar 9, 2026
d8fcd10
ci(pack): skip release upload if no release exists, don't auto-create
MioYuuIH Mar 9, 2026
8b4540f
ci(pack): skip GPU if bundle already exists in release
MioYuuIH Mar 9, 2026
2a0f2ba
ci(pack): remove auto-create release option from manual job
MioYuuIH Mar 9, 2026
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
4 changes: 4 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ jobs:
type=raw,value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Docker metadata (unsuffixed tags — default target only)
Expand All @@ -335,6 +336,7 @@ jobs:
type=raw,value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Merge tags
Expand Down Expand Up @@ -455,6 +457,7 @@ jobs:
type=raw,value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Docker metadata (unsuffixed tags — default target only)
Expand All @@ -471,6 +474,7 @@ jobs:
type=raw,value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Merge tags
Expand Down
228 changes: 228 additions & 0 deletions .github/workflows/pack-bundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

name: Pack Offline Bundle

on:
# Automatic: fires after all images are built on a release tag push.
# The job condition below filters to v* tags on the main repo only.
workflow_run:
workflows: ["Build Docker Images"]
types: [completed]

# Manual: for testing or on-demand bundle creation.
workflow_dispatch:
inputs:
gpu_type:
description: 'GPU type (determines target architecture and HSA config)'
required: true
default: 'strix-halo'
type: choice
options:
- strix-halo # gfx1151 — Ryzen AI Max+ 395 / Max 390
- phx # gfx110x — Ryzen AI 300 (Phoenix)
- strix # gfx110x + HSA override — Ryzen AI 300 (Strix Point)
- rdna4 # gfx120x — Radeon RX 9000 series
image_tag:
description: 'Image tag prefix (default: current branch/tag name)'
required: false
default: ''
type: string
image_registry:
description: 'Registry prefix for custom images (override for forks or private registries)'
required: false
default: 'ghcr.io/amdresearch'
type: string
permissions:
contents: write
packages: read

jobs:
# ── Automatic release: one job per GPU target, triggered by workflow_run ──
pack-release:
name: "Pack Bundle (${{ matrix.gpu_type }}) — Release"
if: |
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_branch, 'v')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gpu_type: [strix-halo, phx, strix, rdna4]

steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Check available disk space
run: df -h /

- name: Checkout code at the release tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PACKAGES_TOKEN || secrets.GITHUB_TOKEN }}

- name: Resolve image tag and registry
id: tag
run: |
RAW="${{ github.event.workflow_run.head_branch }}"
SANITIZED="${RAW//\//-}"
echo "value=${SANITIZED}" >> "$GITHUB_OUTPUT"
echo "Resolved IMAGE_TAG: ${SANITIZED}"
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "registry=ghcr.io/${OWNER}" >> "$GITHUB_OUTPUT"

- name: Check if bundle already exists in release
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.tag.outputs.value }}"
GPU="${{ matrix.gpu_type }}"
if gh release view "${TAG}" &>/dev/null; then
# Check if a bundle for this GPU type is already attached
if gh release view "${TAG}" --json assets --jq '.assets[].name' 2>/dev/null \
| grep -q "auplc-bundle.*${GPU}"; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "Bundle for ${GPU} already exists in release ${TAG}, skipping."
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- name: Run pack command
if: steps.check.outputs.skip != 'true'
env:
GPU_TYPE: ${{ matrix.gpu_type }}
IMAGE_REGISTRY: ${{ steps.tag.outputs.registry }}
IMAGE_TAG: ${{ steps.tag.outputs.value }}
run: ./auplc-installer pack

- name: Verify bundle
if: steps.check.outputs.skip != 'true'
run: |
BUNDLE=$(ls auplc-bundle-*.tar.gz)
echo "Bundle: ${BUNDLE}"
echo "Size: $(du -sh "${BUNDLE}" | cut -f1)"

- name: Upload bundle as artifact
if: steps.check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: auplc-bundle-${{ matrix.gpu_type }}
path: auplc-bundle-*.tar.gz
retention-days: 30
compression-level: 0 # already compressed

- name: Attach bundle to GitHub Release
if: steps.check.outputs.skip != 'true'
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BUNDLE=$(ls auplc-bundle-*.tar.gz)
TAG="${{ github.event.workflow_run.head_branch }}"

# Upload to the existing release. Releases are created manually with
# proper release notes before tagging; CI only attaches the bundle.
if gh release view "${TAG}" &>/dev/null; then
gh release upload "${TAG}" "${BUNDLE}" --clobber
echo "Bundle uploaded to release ${TAG}"
else
echo "No release found for ${TAG}, skipping upload."
fi

# ── Manual: single GPU target via workflow_dispatch ──
pack-manual:
name: "Pack Bundle (${{ inputs.gpu_type }})"
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest

steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Check available disk space
run: df -h /

- name: Checkout code
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PACKAGES_TOKEN || secrets.GITHUB_TOKEN }}

- name: Resolve image tag
id: tag
run: |
# Use explicit input if provided; otherwise derive from branch/tag name.
# Sanitize: Docker tags cannot contain '/' — replace with '-'.
RAW="${{ inputs.image_tag || github.ref_name }}"
echo "value=${RAW//\//-}" >> "$GITHUB_OUTPUT"
echo "Resolved IMAGE_TAG: ${RAW//\//-}"

- name: Run pack command
env:
GPU_TYPE: ${{ inputs.gpu_type }}
IMAGE_REGISTRY: ${{ inputs.image_registry }}
IMAGE_TAG: ${{ steps.tag.outputs.value }}
run: ./auplc-installer pack

- name: Verify bundle
run: |
BUNDLE=$(ls auplc-bundle-*.tar.gz)
echo "Bundle: ${BUNDLE}"
echo "Size: $(du -sh "${BUNDLE}" | cut -f1)"
- name: Upload bundle as artifact
uses: actions/upload-artifact@v4
with:
name: auplc-bundle-${{ inputs.gpu_type }}
path: auplc-bundle-*.tar.gz
retention-days: 7
compression-level: 0 # already compressed

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,7 @@ dockerfiles/Courses/DL/data/FashionMNIST/raw/
# Local config overrides (any file containing 'local')
*local*
*.local.*

# Offline bundle artifacts
auplc-bundle-*/
auplc-bundle-*.tar.gz
Loading