Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
9f01dd25
Unverified
Commit
9f01dd25
authored
Mar 13, 2026
by
Ran Rubin
Committed by
GitHub
Mar 13, 2026
Browse files
chore: multi-arch frontend image (#7290)
parent
57648c19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
30 deletions
+33
-30
.github/actions/docker-remote-build/action.yml
.github/actions/docker-remote-build/action.yml
+12
-5
.github/workflows/build-frontend-image.yaml
.github/workflows/build-frontend-image.yaml
+21
-25
No files found.
.github/actions/docker-remote-build/action.yml
View file @
9f01dd25
...
...
@@ -84,6 +84,13 @@ runs:
IMAGE_TAG="${{ inputs.image_tag }}"
# Normalize platform: prepend linux/ only when not already present
PLATFORM_FLAG="${PLATFORM}"
if [[ "$PLATFORM_FLAG" != linux/* ]]; then
PLATFORM_FLAG="linux/${PLATFORM_FLAG}"
fi
# Sanitized platform for registry tags and filenames (no slashes or commas)
PLATFORM_SAFE=$(echo "${PLATFORM}" | sed 's|linux/||g; s/,/-/g')
CUDA_VERSION_MAJOR=${CUDA_VERSION%%.*}
...
...
@@ -94,7 +101,7 @@ runs:
# Create build logs directory
mkdir -p build-logs
BUILD_LOG_FILE="build-logs/build-${{ inputs.framework }}-${
{ inputs.platform }
}.log"
BUILD_LOG_FILE="build-logs/build-${{ inputs.framework }}-${
PLATFORM_SAFE
}.log"
echo "BUILD_LOG_FILE=${BUILD_LOG_FILE}" >> $GITHUB_ENV
echo "📝 Build log will be saved to: ${BUILD_LOG_FILE}"
...
...
@@ -102,7 +109,7 @@ runs:
# Set base cache args and set --cache-to if this is a main commit
CACHE_ARGS=""
if [[ "${{ inputs.target }}" != "frontend" ]]; then
CACHE_TAG="${{ inputs.framework }}-cuda${CUDA_VERSION_MAJOR}-${PLATFORM}-cache"
CACHE_TAG="${{ inputs.framework }}-cuda${CUDA_VERSION_MAJOR}-${PLATFORM
_SAFE
}-cache"
CACHE_ARGS="--cache-from type=registry,ref=${ECR_HOSTNAME}/ai-dynamo/dynamo:main-${CACHE_TAG} "
CACHE_ARGS+="--cache-from type=registry,ref=${ECR_HOSTNAME}/ai-dynamo/dynamo:release-${CACHE_TAG} "
if [[ "$GITHUB_REF_NAME" =~ ^release ]]; then
...
...
@@ -112,7 +119,7 @@ runs:
CACHE_ARGS+="--cache-to type=registry,ref=${ECR_HOSTNAME}/ai-dynamo/dynamo:main-${CACHE_TAG},mode=max "
fi
else
CACHE_TAG="${{ inputs.target }}-cuda${CUDA_VERSION_MAJOR}-${PLATFORM}-cache"
CACHE_TAG="${{ inputs.target }}-cuda${CUDA_VERSION_MAJOR}-${PLATFORM
_SAFE
}-cache"
CACHE_ARGS="--cache-from type=registry,ref=${ECR_HOSTNAME}/ai-dynamo/dynamo:main-${CACHE_TAG} "
if [[ "$GITHUB_REF_NAME" == "main" ]]; then
CACHE_ARGS+="--cache-to type=registry,ref=${ECR_HOSTNAME}/ai-dynamo/dynamo:main-${CACHE_TAG},mode=max "
...
...
@@ -166,7 +173,7 @@ runs:
docker buildx build \
--progress=plain \
--tag "$IMAGE_TAG" \
--platform
linux/${{ inputs.platform }}
\
--platform
"${PLATFORM_FLAG}"
\
-f ./container/rendered.Dockerfile \
$CACHE_ARGS $EXTRA_ARGS $SECRET_ARGS . 2>&1 | tee "${BUILD_LOG_FILE}"
...
...
@@ -236,7 +243,7 @@ runs:
echo "⚠️ No image tag available"
fi
PLATFORM_ARCH=$(echo "${{ inputs.platform }}" | sed 's
/
linux
\///
')
PLATFORM_ARCH=$(echo "${{ inputs.platform }}" | sed 's
|
linux
/||g; s/,/-/g
')
echo " Architecture: ${PLATFORM_ARCH}"
echo "PLATFORM_ARCH=${PLATFORM_ARCH}" >> $GITHUB_ENV
JOB_KEY="${{ inputs.framework }}-${PLATFORM_ARCH}"
...
...
.github/workflows/build-frontend-image.yaml
View file @
9f01dd25
...
...
@@ -18,7 +18,7 @@ on:
type
:
boolean
default
:
false
image_prefix
:
description
:
'
Optional
prefix
for
image
tags
(e.g.,
release-0.9.0).
When
set,
images
are
also
tagged
as
{prefix}-frontend
-{arch}
.'
description
:
'
Optional
prefix
for
image
tags
(e.g.,
release-0.9.0).
When
set,
images
are
also
tagged
as
{prefix}-frontend.'
required
:
false
type
:
string
default
:
'
'
...
...
@@ -124,11 +124,9 @@ jobs:
name
:
Build Frontend Image
needs
:
[
changed-files
,
build-epp-image
]
if
:
needs.changed-files.outputs.frontend == 'true' || inputs.skip_change_detection ==
true
|| startsWith(github.ref_name, 'release/')
strategy
:
fail-fast
:
false
matrix
:
arch
:
[
amd64
,
arm64
]
runs-on
:
prod-builder-v3
outputs
:
target_tag
:
${{ steps.calculate-target-tag.outputs.target_tag }}
env
:
IMAGE_REGISTRY
:
ai-dynamo
IMAGE_REPOSITORY
:
dynamo
...
...
@@ -136,6 +134,7 @@ jobs:
TARGET
:
frontend
CUDA_VERSION
:
"
12.9"
FRAMEWORK
:
dynamo
PLATFORM
:
"
linux/amd64,linux/arm64"
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
# v4.3.0
...
...
@@ -146,7 +145,7 @@ jobs:
python ./container/render.py \
--target=${{ env.TARGET }} \
--framework=${{ env.FRAMEWORK }} \
--platform=${{
matrix.arch
}} \
--platform=${{
env.PLATFORM
}} \
--cuda-version=${{ env.CUDA_VERSION }} \
--show-result \
--output-short-filename
...
...
@@ -155,7 +154,7 @@ jobs:
shell
:
bash
run
:
|
ECR_IMAGE_BASE="${{ env.ECR_HOSTNAME }}/${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPOSITORY }}"
TARGET_TAG="${{ github.sha }}-${{ env.TARGET
}}-${{ matrix.arch
}}"
TARGET_TAG="${{ github.sha }}-${{ env.TARGET }}"
echo "ecr_image_base=${ECR_IMAGE_BASE}" >> $GITHUB_OUTPUT
echo "default_target_image_uri=${ECR_IMAGE_BASE}:${TARGET_TAG}" >> $GITHUB_OUTPUT
echo "epp_image_uri=${{ env.ECR_HOSTNAME }}/${{ needs.build-epp-image.outputs.epp_image_ref }}" >> $GITHUB_OUTPUT
...
...
@@ -167,7 +166,7 @@ jobs:
echo "image_tag: ${{ steps.calculate-target-tag.outputs.default_target_image_uri }}"
echo "framework: ${{ env.FRAMEWORK }}"
echo "target: ${{ env.TARGET }}"
echo "platform: ${{
matrix.arch
}}"
echo "platform: ${{
env.PLATFORM
}}"
echo "cuda_version: ${{ env.CUDA_VERSION }}"
echo "extra_tags: ${{ steps.calculate-target-tag.outputs.azure_target_image_uri }}"
echo "epp_image_uri: ${{ steps.calculate-target-tag.outputs.epp_image_uri }}"
...
...
@@ -185,7 +184,7 @@ jobs:
with
:
builder_name
:
${{ needs.changed-files.outputs.builder_name }}
flavor
:
general
arch
:
${{ matrix.arch }}
all_
arch
:
'
true'
-
name
:
Build Frontend Container
id
:
build-image
timeout-minutes
:
30
...
...
@@ -194,7 +193,7 @@ jobs:
image_tag
:
${{ steps.calculate-target-tag.outputs.default_target_image_uri }}
framework
:
${{ env.FRAMEWORK }}
target
:
${{ env.TARGET }}
platform
:
${{
matrix.arch
}}
platform
:
${{
env.PLATFORM
}}
cuda_version
:
${{ env.CUDA_VERSION }}
aws_default_region
:
${{ secrets.AWS_DEFAULT_REGION }}
sccache_s3_bucket
:
${{ secrets.SCCACHE_S3_BUCKET }}
...
...
@@ -205,15 +204,15 @@ jobs:
extra_build_args
:
|
EPP_IMAGE=${{ steps.calculate-target-tag.outputs.epp_image_uri }}
extra_tags
:
|
${{
matrix.arch == 'amd64' &&
steps.calculate-target-tag.outputs.azure_target_image_uri
|| ''
}}
${{ github.ref_name == 'main' && format('{0}:main-frontend
-{1}
', steps.calculate-target-tag.outputs.ecr_image_base
, matrix.arch
) || '' }}
${{ github.ref_name == 'main' && format('{0}:main-frontend-{1}
-{2}
', steps.calculate-target-tag.outputs.ecr_image_base, github.sha
, matrix.arch
) || '' }}
${{ inputs.image_prefix != '' && format('{0}:{1}-frontend
-{2}
', steps.calculate-target-tag.outputs.ecr_image_base, inputs.image_prefix
, matrix.arch
) || '' }}
${{ steps.calculate-target-tag.outputs.azure_target_image_uri }}
${{ github.ref_name == 'main' && format('{0}:main-frontend', steps.calculate-target-tag.outputs.ecr_image_base) || '' }}
${{ github.ref_name == 'main' && format('{0}:main-frontend-{1}', steps.calculate-target-tag.outputs.ecr_image_base, github.sha) || '' }}
${{ inputs.image_prefix != '' && format('{0}:{1}-frontend', steps.calculate-target-tag.outputs.ecr_image_base, inputs.image_prefix) || '' }}
-
name
:
Show summary
shell
:
bash
run
:
|
echo "###
🐳 ${{ env.FRAMEWORK }}-cuda${{ env.CUDA_VERSION }}-${{ matrix.arch }} Default Image
" >> $GITHUB_STEP_SUMMARY
echo "###
Frontend Image (multi-arch)
" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Image URI |" >> $GITHUB_STEP_SUMMARY
echo "|-----|" >> $GITHUB_STEP_SUMMARY
...
...
@@ -229,9 +228,13 @@ jobs:
strategy
:
fail-fast
:
false
matrix
:
arch
:
[
amd64
,
arm64
]
include
:
-
arch
:
amd64
runner
:
prod-builder-amd-v1
-
arch
:
arm64
runner
:
prod-tester-arm-v1
name
:
Compliance frontend-${{ matrix.arch }}
runs-on
:
${{ matrix.
arch == 'amd64' && 'prod-builder-amd-v1' || 'prod-tester-arm-v1'
}}
runs-on
:
${{ matrix.
runner
}}
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
# v4.3.0
...
...
@@ -243,17 +246,10 @@ jobs:
azure_acr_hostname
:
${{ secrets.AZURE_ACR_HOSTNAME }}
azure_acr_user
:
${{ secrets.AZURE_ACR_USER }}
azure_acr_password
:
${{ secrets.AZURE_ACR_PASSWORD }}
-
name
:
Calculate image URI
id
:
images
shell
:
bash
run
:
|
TARGET_TAG="${{ github.sha }}-frontend-${{ matrix.arch }}"
FRONTEND_IMAGE="${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com/ai-dynamo/dynamo:${TARGET_TAG}"
echo "frontend_image=${FRONTEND_IMAGE}" >> $GITHUB_OUTPUT
-
name
:
Compliance scan
uses
:
./.github/actions/compliance-scan
with
:
image
:
${{ s
teps.images.outputs.
frontend
_
image }}
image
:
${{ s
ecrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com/ai-dynamo/dynamo:${{ needs.build-
frontend
-
image
.outputs.target_tag
}}
artifact_name
:
compliance-frontend-${{ matrix.arch }}
framework
:
dynamo
target
:
frontend
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment