Skip to content

Commit 8f0ac73

Browse files
authored
feat: add runtime sanity checks for runtime images (#4788)
Signed-off-by: Keiven Chang <[email protected]> Co-authored-by: Keiven Chang <[email protected]>
1 parent 3bad966 commit 8f0ac73

File tree

2 files changed

+224
-41
lines changed

2 files changed

+224
-41
lines changed

.github/actions/docker-build/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,26 @@ runs:
151151
# Exit with the build's exit code
152152
exit ${BUILD_EXIT_CODE}
153153
154+
- name: Run Sanity Check on Runtime Image
155+
if: inputs.target == 'runtime'
156+
shell: bash
157+
run: |
158+
IMAGE_TAG="${{ steps.build.outputs.image_tag }}"
159+
echo "Running sanity check on image: $IMAGE_TAG"
160+
161+
# Run the sanity check script inside the container
162+
# The script is located in /workspace/deploy/sanity_check.py in runtime containers
163+
set +e
164+
docker run --rm "$IMAGE_TAG" python /workspace/deploy/sanity_check.py --runtime-check --no-gpu-check
165+
SANITY_CHECK_EXIT_CODE=$?
166+
set -e
167+
if [ ${SANITY_CHECK_EXIT_CODE} -ne 0 ]; then
168+
echo "ERROR: Sanity check failed - ai-dynamo packages not properly installed"
169+
exit ${SANITY_CHECK_EXIT_CODE}
170+
else
171+
echo "✅ Sanity check passed"
172+
fi
173+
154174
- name: Capture Build Metrics
155175
id: metrics
156176
shell: bash

0 commit comments

Comments
 (0)