Split up arm64 builds into their own targets

This commit is contained in:
Kishor Prins 2025-06-29 17:55:28 -07:00
parent 7e9108efc6
commit 67ac35f7bf
2 changed files with 31 additions and 5 deletions

View file

@ -28,6 +28,7 @@ jobs:
build-images:
needs: prepare-release
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
packages: write # Needed to push images to GHCR
env:
@ -37,7 +38,7 @@ jobs:
VERSION: ${{ needs.prepare-release.outputs.version_tag }} # Use tag version (vX.Y.Z) for bake
strategy:
matrix:
build_target: ["cpu", "gpu", "rocm"]
build_target: ["cpu", "cpu-arm64", "gpu-arm64", "gpu", "rocm"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
@ -62,9 +63,8 @@ jobs:
echo "Listing current disk space"
df -h
echo "Cleaning up disk space..."
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache /usr/local/share/boost
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache
sudo docker system prune -af
sudo docker builder prune -a
echo "Disk space after cleanup"
df -h

View file

@ -49,7 +49,16 @@ target "_rocm_base" {
# CPU target with multi-platform support
target "cpu" {
inherits = ["_cpu_base"]
platforms = ["linux/amd64", "linux/arm64"]
platforms = ["linux/amd64"]
tags = [
"${REGISTRY}/${OWNER}/${REPO}-cpu:${VERSION}",
"${REGISTRY}/${OWNER}/${REPO}-cpu:latest"
]
}
target "cpu-arm64" {
inherits = ["_cpu_base"]
platforms = ["linux/arm64"]
tags = [
"${REGISTRY}/${OWNER}/${REPO}-cpu:${VERSION}",
"${REGISTRY}/${OWNER}/${REPO}-cpu:latest"
@ -59,7 +68,16 @@ target "cpu" {
# GPU target with multi-platform support
target "gpu" {
inherits = ["_gpu_base"]
platforms = ["linux/amd64", "linux/arm64"]
platforms = ["linux/amd64"]
tags = [
"${REGISTRY}/${OWNER}/${REPO}-gpu:${VERSION}",
"${REGISTRY}/${OWNER}/${REPO}-gpu:latest"
]
}
target "gpu-arm64" {
inherits = ["_gpu_base"]
platforms = ["linux/arm64"]
tags = [
"${REGISTRY}/${OWNER}/${REPO}-gpu:${VERSION}",
"${REGISTRY}/${OWNER}/${REPO}-gpu:latest"
@ -81,6 +99,14 @@ group "cpu" {
targets = ["cpu"]
}
group "cpu-arm64" {
targets = ["cpu-arm64"]
}
group "gpu-arm64" {
targets = ["gpu-arm64"]
}
group "gpu" {
targets = ["gpu"]
}