Skip to content

Commit 616f8df

Browse files
[TRTLLM-17014][infra] migrate build artifacts to artifactory.nvidia.com
Publish build_info.txt, the packaged builds (*.tar.gz) and waive_list/ to sw-tensorrt-llm-generic-local on artifactory.nvidia.com instead of sw-tensorrt-generic on urm.nvidia.com, and read them from there first. - Readers fall back to urm only when a file is absent (HTTP 404), so builds published before the switch stay readable. A rejected credential fails fast with a message that names the credential and says that its token needs renewal or lacks the permission the request needs, and never falls back. - jenkins/scripts/fetch_build_artifact.sh is the one read helper: the pipelines, the Slurm jobs, the image build, coverage-based test selection and BOLT profile generation run it, and it checks each download's SHA-1. jenkins/scripts/check_artifactory_access.sh checks the CI identities in each environment. - LLM_ARTIFACTS_PRIMARY=urm on the Jenkins controllers returns publishing and first reads to urm without a code change. A parent pipeline passes its value to the jobs it starts. - Build reuse copies within one instance, and rebuilds when the earlier build is only on the other one. - While under test, jenkins/L0_MergeRequest.groovy loads trtllm-jenkins-shared-lib from the branch of the library change that adds the artifactory.nvidia.com destination to uploadArtifacts. - Until trtllm-artifactory-credentials holds read permission on sw-tensorrt-llm-generic-local, reads of these artifacts use aws-artifactory-credentials, the publishing credential. Container-image pulls keep trtllm-artifactory-credentials. - specs/001-migrate-builds-aws-artifactory/ carries the design documents for review while the pull request is a draft. They are removed before it is marked ready. Signed-off-by: Sharabesh Jayaraman <338298191+sharabeshj-nvda@users.noreply.github.com>
1 parent dac84b0 commit 616f8df

29 files changed

Lines changed: 9420 additions & 269 deletions

‎docker/Dockerfile.multi‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,33 @@ ARG GIT_COMMIT
159159
ARG GITHUB_MIRROR=""
160160
ARG BUILD_WHEEL_ARGS="--clean"
161161
ARG BUILD_WHEEL_SCRIPT="scripts/build_wheel.py"
162+
# Used when BUILD_WHEEL_SCRIPT takes the wheel from a packaged build
163+
# (scripts/get_wheel_from_package.py): the location read first (aws or urm; empty
164+
# means aws) and the name of the credential behind the artifactory_netrc secret,
165+
# which appears only in error messages.
166+
ARG LLM_ARTIFACTS_PRIMARY=""
167+
ARG ARTIFACTORY_CREDENTIAL_ID=""
162168
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=cache,target=${CCACHE_DIR} \
163169
--mount=type=secret,id=github_clone_token \
170+
--mount=type=secret,id=artifactory_netrc \
171+
--mount=type=bind,source=jenkins/scripts/fetch_build_artifact.sh,target=/src/tensorrt_llm/jenkins/scripts/fetch_build_artifact.sh \
164172
if [ -n "$GITHUB_MIRROR" ]; then \
165173
export PIP_INDEX_URL="https://artifactory.pdx.nvidia.com/artifactory/api/pypi/pypi-remote/simple"; \
166174
fi && \
167175
# Authenticates `git submodule update` and the CMake FetchContent clones
168176
# (3rdparty/fetch_content.json) that this build pulls from github.com.
169177
. docker/common/github_auth.sh && \
178+
# get_wheel_from_package.py reads the packaged build through the bind-mounted
179+
# jenkins/scripts/fetch_build_artifact.sh, which takes the Artifactory access token
180+
# for artifactory.nvidia.com from this netrc. The secret is present only when the
181+
# build passes it (ARTIFACTORY_NETRC in docker/Makefile).
182+
if [ -f /run/secrets/artifactory_netrc ]; then \
183+
export ARTIFACTORY_NETRC=/run/secrets/artifactory_netrc; \
184+
fi && \
170185
TRTLLM_BUILD_SOURCE_COMMIT=${GIT_COMMIT} \
171186
GITHUB_MIRROR=${GITHUB_MIRROR} \
187+
LLM_ARTIFACTS_PRIMARY=${LLM_ARTIFACTS_PRIMARY} \
188+
ARTIFACTORY_CREDENTIAL_ID=${ARTIFACTORY_CREDENTIAL_ID} \
172189
python3 ${BUILD_WHEEL_SCRIPT} ${BUILD_WHEEL_ARGS}
173190

174191
FROM ${DEVEL_IMAGE} AS release

‎docker/Makefile‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,19 @@ GITHUB_MIRROR ?=
5555
# environment, never passed as a build arg -- build-arg values stay readable in
5656
# `docker history`. Empty means anonymous, rate-limited access.
5757
GITHUB_CLONE_TOKEN ?=
58+
# Optional netrc file with an Artifactory access token for artifactory.nvidia.com,
59+
# needed when the wheel stage takes the wheel from a packaged build
60+
# (BUILD_WHEEL_SCRIPT=scripts/get_wheel_from_package.py, which reads it through
61+
# jenkins/scripts/fetch_build_artifact.sh). Passed as a BuildKit secret, never as a
62+
# build arg, for the same reason as GITHUB_CLONE_TOKEN.
63+
ARTIFACTORY_NETRC ?=
64+
# The location the packaged build is read from first (aws or urm; empty means aws),
65+
# and the name of the CI credential behind ARTIFACTORY_NETRC, used only in messages.
66+
LLM_ARTIFACTS_PRIMARY ?=
67+
ARTIFACTORY_CREDENTIAL_ID ?=
5868
COMMA := ,
5969
GITHUB_SECRET_ARG := $(if $(GITHUB_CLONE_TOKEN),--secret id=github_clone_token$(COMMA)env=GITHUB_CLONE_TOKEN)
70+
ARTIFACTORY_SECRET_ARG := $(if $(ARTIFACTORY_NETRC),--secret id=artifactory_netrc$(COMMA)src=$(ARTIFACTORY_NETRC))
6071
PYTHON_VERSION ?=
6172
NGC_STAGING_REPO ?= nvcr.io/nvstaging/tensorrt-llm
6273
NGC_REPO ?= nvcr.io/nvidia/tensorrt-llm
@@ -95,12 +106,15 @@ base_pull:
95106
docker buildx build $(DOCKER_BUILD_OPTS) $(DOCKER_BUILD_ARGS) \
96107
--progress $(DOCKER_PROGRESS) \
97108
$(GITHUB_SECRET_ARG) \
109+
$(ARTIFACTORY_SECRET_ARG) \
98110
$(if $(BASE_IMAGE), --build-arg BASE_IMAGE=$(BASE_IMAGE)) \
99111
$(if $(BASE_TAG), --build-arg BASE_TAG=$(BASE_TAG)) \
100112
$(if $(TRITON_IMAGE), --build-arg TRITON_IMAGE=$(TRITON_IMAGE)) \
101113
$(if $(TRITON_BASE_TAG), --build-arg TRITON_BASE_TAG=$(TRITON_BASE_TAG)) \
102114
$(if $(BUILD_WHEEL_ARGS), --build-arg BUILD_WHEEL_ARGS="$(BUILD_WHEEL_ARGS)") \
103115
$(if $(BUILD_WHEEL_SCRIPT), --build-arg BUILD_WHEEL_SCRIPT="$(BUILD_WHEEL_SCRIPT)") \
116+
$(if $(LLM_ARTIFACTS_PRIMARY), --build-arg LLM_ARTIFACTS_PRIMARY="$(LLM_ARTIFACTS_PRIMARY)") \
117+
$(if $(ARTIFACTORY_CREDENTIAL_ID), --build-arg ARTIFACTORY_CREDENTIAL_ID="$(ARTIFACTORY_CREDENTIAL_ID)") \
104118
$(if $(TORCH_INSTALL_TYPE), --build-arg TORCH_INSTALL_TYPE="$(TORCH_INSTALL_TYPE)") \
105119
$(if $(CUDA_VERSION), --build-arg CUDA_VER="$(CUDA_VERSION)") \
106120
$(if $(CUDNN_VERSION), --build-arg CUDNN_VER="$(CUDNN_VERSION)") \

‎jenkins/BoltProfileGen.groovy‎

Lines changed: 213 additions & 51 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)