1818 type : boolean
1919 default : false
2020 image_prefix :
21- description : ' Optional prefix for image tags (e.g., release-0.9.0). When set, images are also tagged as {prefix}-frontend-{arch} .'
21+ description : ' Optional prefix for image tags (e.g., release-0.9.0). When set, images are also tagged as {prefix}-frontend.'
2222 required : false
2323 type : string
2424 default : ' '
@@ -124,18 +124,17 @@ jobs:
124124 name : Build Frontend Image
125125 needs : [changed-files, build-epp-image]
126126 if : needs.changed-files.outputs.frontend == 'true' || inputs.skip_change_detection == true || startsWith(github.ref_name, 'release/')
127- strategy :
128- fail-fast : false
129- matrix :
130- arch : [amd64, arm64]
131127 runs-on : prod-builder-v3
128+ outputs :
129+ target_tag : ${{ steps.calculate-target-tag.outputs.target_tag }}
132130 env :
133131 IMAGE_REGISTRY : ai-dynamo
134132 IMAGE_REPOSITORY : dynamo
135133 ECR_HOSTNAME : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com
136134 TARGET : frontend
137135 CUDA_VERSION : " 12.9"
138136 FRAMEWORK : dynamo
137+ PLATFORM : " linux/amd64,linux/arm64"
139138 steps :
140139 - name : Checkout repository
141140 uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
@@ -146,7 +145,7 @@ jobs:
146145 python ./container/render.py \
147146 --target=${{ env.TARGET }} \
148147 --framework=${{ env.FRAMEWORK }} \
149- --platform=${{ matrix.arch }} \
148+ --platform=${{ env.PLATFORM }} \
150149 --cuda-version=${{ env.CUDA_VERSION }} \
151150 --show-result \
152151 --output-short-filename
@@ -155,7 +154,7 @@ jobs:
155154 shell : bash
156155 run : |
157156 ECR_IMAGE_BASE="${{ env.ECR_HOSTNAME }}/${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPOSITORY }}"
158- TARGET_TAG="${{ github.sha }}-${{ env.TARGET }}-${{ matrix.arch }} "
157+ TARGET_TAG="${{ github.sha }}-${{ env.TARGET }}"
159158 echo "ecr_image_base=${ECR_IMAGE_BASE}" >> $GITHUB_OUTPUT
160159 echo "default_target_image_uri=${ECR_IMAGE_BASE}:${TARGET_TAG}" >> $GITHUB_OUTPUT
161160 echo "epp_image_uri=${{ env.ECR_HOSTNAME }}/${{ needs.build-epp-image.outputs.epp_image_ref }}" >> $GITHUB_OUTPUT
@@ -167,7 +166,7 @@ jobs:
167166 echo "image_tag: ${{ steps.calculate-target-tag.outputs.default_target_image_uri }}"
168167 echo "framework: ${{ env.FRAMEWORK }}"
169168 echo "target: ${{ env.TARGET }}"
170- echo "platform: ${{ matrix.arch }}"
169+ echo "platform: ${{ env.PLATFORM }}"
171170 echo "cuda_version: ${{ env.CUDA_VERSION }}"
172171 echo "extra_tags: ${{ steps.calculate-target-tag.outputs.azure_target_image_uri }}"
173172 echo "epp_image_uri: ${{ steps.calculate-target-tag.outputs.epp_image_uri }}"
@@ -185,7 +184,7 @@ jobs:
185184 with :
186185 builder_name : ${{ needs.changed-files.outputs.builder_name }}
187186 flavor : general
188- arch : ${{ matrix.arch }}
187+ all_arch : ' true '
189188 - name : Build Frontend Container
190189 id : build-image
191190 timeout-minutes : 30
@@ -194,7 +193,7 @@ jobs:
194193 image_tag : ${{ steps.calculate-target-tag.outputs.default_target_image_uri }}
195194 framework : ${{ env.FRAMEWORK }}
196195 target : ${{ env.TARGET }}
197- platform : ${{ matrix.arch }}
196+ platform : ${{ env.PLATFORM }}
198197 cuda_version : ${{ env.CUDA_VERSION }}
199198 aws_default_region : ${{ secrets.AWS_DEFAULT_REGION }}
200199 sccache_s3_bucket : ${{ secrets.SCCACHE_S3_BUCKET }}
@@ -205,15 +204,15 @@ jobs:
205204 extra_build_args : |
206205 EPP_IMAGE=${{ steps.calculate-target-tag.outputs.epp_image_uri }}
207206 extra_tags : |
208- ${{ matrix.arch == 'amd64' && steps.calculate-target-tag.outputs.azure_target_image_uri || '' }}
209- ${{ github.ref_name == 'main' && format('{0}:main-frontend-{1} ', steps.calculate-target-tag.outputs.ecr_image_base, matrix.arch ) || '' }}
210- ${{ github.ref_name == 'main' && format('{0}:main-frontend-{1}-{2} ', steps.calculate-target-tag.outputs.ecr_image_base, github.sha, matrix.arch ) || '' }}
211- ${{ inputs.image_prefix != '' && format('{0}:{1}-frontend-{2} ', steps.calculate-target-tag.outputs.ecr_image_base, inputs.image_prefix, matrix.arch ) || '' }}
207+ ${{ steps.calculate-target-tag.outputs.azure_target_image_uri }}
208+ ${{ github.ref_name == 'main' && format('{0}:main-frontend', steps.calculate-target-tag.outputs.ecr_image_base) || '' }}
209+ ${{ github.ref_name == 'main' && format('{0}:main-frontend-{1}', steps.calculate-target-tag.outputs.ecr_image_base, github.sha) || '' }}
210+ ${{ inputs.image_prefix != '' && format('{0}:{1}-frontend', steps.calculate-target-tag.outputs.ecr_image_base, inputs.image_prefix) || '' }}
212211
213212 - name : Show summary
214213 shell : bash
215214 run : |
216- echo "### 🐳 ${{ env.FRAMEWORK }}-cuda${{ env.CUDA_VERSION }}-${{ matrix. arch }} Default Image " >> $GITHUB_STEP_SUMMARY
215+ echo "### Frontend Image (multi- arch) " >> $GITHUB_STEP_SUMMARY
217216 echo "" >> $GITHUB_STEP_SUMMARY
218217 echo "| Image URI |" >> $GITHUB_STEP_SUMMARY
219218 echo "|-----|" >> $GITHUB_STEP_SUMMARY
@@ -229,9 +228,13 @@ jobs:
229228 strategy :
230229 fail-fast : false
231230 matrix :
232- arch : [amd64, arm64]
231+ include :
232+ - arch : amd64
233+ runner : prod-builder-amd-v1
234+ - arch : arm64
235+ runner : prod-tester-arm-v1
233236 name : Compliance frontend-${{ matrix.arch }}
234- runs-on : ${{ matrix.arch == 'amd64' && 'prod-builder-amd-v1' || 'prod-tester-arm-v1' }}
237+ runs-on : ${{ matrix.runner }}
235238 steps :
236239 - name : Checkout repository
237240 uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
@@ -243,17 +246,10 @@ jobs:
243246 azure_acr_hostname : ${{ secrets.AZURE_ACR_HOSTNAME }}
244247 azure_acr_user : ${{ secrets.AZURE_ACR_USER }}
245248 azure_acr_password : ${{ secrets.AZURE_ACR_PASSWORD }}
246- - name : Calculate image URI
247- id : images
248- shell : bash
249- run : |
250- TARGET_TAG="${{ github.sha }}-frontend-${{ matrix.arch }}"
251- FRONTEND_IMAGE="${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com/ai-dynamo/dynamo:${TARGET_TAG}"
252- echo "frontend_image=${FRONTEND_IMAGE}" >> $GITHUB_OUTPUT
253249 - name : Compliance scan
254250 uses : ./.github/actions/compliance-scan
255251 with :
256- image : ${{ steps.images. outputs.frontend_image }}
252+ image : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com/ai-dynamo/dynamo:${{ needs.build-frontend-image. outputs.target_tag }}
257253 artifact_name : compliance-frontend-${{ matrix.arch }}
258254 framework : dynamo
259255 target : frontend
0 commit comments