Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ inputs:
dynamo_base_image:
description: 'Pre-built Dynamo base image to use instead of building from scratch'
required: false

use_ci_registry:
description: 'Use CI registry instead of default registry'
required: false
outputs:
image_tag:
description: 'Image Tag'
Expand Down Expand Up @@ -137,8 +139,15 @@ runs:
EXTRA_ARGS+=" --build-arg ENABLE_KVBM=${{ inputs.enable_kvbm }}"
fi

if [ "${{ inputs.use_ci_registry }}" == "true" ]; then
REGISTRY="${ECR_HOSTNAME}"
else
REGISTRY="nvcr.io"
fi

# Execute build and capture output (show on console AND save to file)
./container/build.sh --tag "$IMAGE_TAG" \
--registry $REGISTRY \
--target ${{ inputs.target }} \
--vllm-max-jobs 10 \
--framework ${{ inputs.framework }} \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/container-validation-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ jobs:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
use_ci_registry: 'true'
- name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push
with:
Expand Down Expand Up @@ -232,6 +233,7 @@ jobs:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
use_ci_registry: 'true'
- name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push
with:
Expand Down Expand Up @@ -293,6 +295,7 @@ jobs:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
use_ci_registry: 'true'
- name: Docker Tag and Push
uses: ./.github/actions/docker-tag-push
with:
Expand Down
21 changes: 20 additions & 1 deletion container/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,15 @@ get_options() {
missing_requirement "$1"
fi
;;
--registry)
# Override the default registry
if [ "$2" ]; then
REGISTRY=$2
shift
else
missing_requirement "$1"
fi
;;
--no-tag-latest)
NO_TAG_LATEST=true
;;
Expand All @@ -347,6 +356,15 @@ get_options() {
shift
done

# Handle registry override if specified
if [ -n "$REGISTRY" ]; then
TRTLLM_BASE_IMAGE="${TRTLLM_BASE_IMAGE/nvcr.io/$REGISTRY}"
VLLM_BASE_IMAGE="${VLLM_BASE_IMAGE/nvcr.io/$REGISTRY}"
NONE_BASE_IMAGE="${NONE_BASE_IMAGE/nvcr.io/$REGISTRY}"
SGLANG_BASE_IMAGE="${SGLANG_BASE_IMAGE/nvcr.io/$REGISTRY}"
SGLANG_FRAMEWORK_IMAGE="${SGLANG_FRAMEWORK_IMAGE/nvcr.io/$REGISTRY}"
fi

# Validate that --uid and --gid are only used with local-dev target
if [[ -n "${CUSTOM_UID:-}" || -n "${CUSTOM_GID:-}" ]]; then
if [[ "${TARGET:-}" != "local-dev" ]]; then
Expand Down Expand Up @@ -467,6 +485,7 @@ show_help() {
echo " [--sccache-region S3 region for sccache (required with --use-sccache)]"
echo " [--vllm-max-jobs number of parallel jobs for compilation (only used by vLLM framework)]"
echo " [--no-tag-latest do not add latest-{framework} tag to built image]"
echo " [--registry registry URL to replace nvcr.io in base images]"
echo ""
echo " Note: When using --use-sccache, AWS credentials must be set:"
echo " export AWS_ACCESS_KEY_ID=your_access_key"
Expand Down Expand Up @@ -920,4 +939,4 @@ if [[ "${LOCAL_DEV_BUILD:-}" == "true" ]]; then
fi


{ set +x; } 2>/dev/null
{ set +x; } 2>/dev/null
Loading