Skip to content

Commit cee7071

Browse files
authored
[None][infra] Add container notices and documentation (#9185)
Signed-off-by: Parker Drake <[email protected]>
1 parent 041bb32 commit cee7071

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed

CONTAINER_SOURCE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Container Source Notices
2+
3+
A `NOTICES.txt` file containing a link to the open source archive for a given container can be found at `/` in both the `release` and `devel` images.
4+
5+
Generally, source archives for each image and its tags can be found at the below links:
6+
7+
* [TensorRT-LLM Release](https://opensource.nvidia.com/oss/teams/nvidia/release/index.html)
8+
* [TensorRT-LLM Develop](https://opensource.nvidia.com/oss/teams/nvidia/devel/index.html)

docker/Dockerfile.multi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_ucx.sh && \
8080
rm install_nixl.sh && \
8181
rm install_etcd.sh
8282

83+
# Generate OSS attribution file for devel image
84+
ARG TRT_LLM_VER
85+
ARG TARGETARCH
86+
COPY scripts/generate_container_oss_attribution.sh /tmp/generate_container_oss_attribution.sh
87+
RUN bash /tmp/generate_container_oss_attribution.sh "devel" "${TRT_LLM_VER}" "${TARGETARCH}" && \
88+
rm /tmp/generate_container_oss_attribution.sh
89+
8390
FROM ${TRITON_IMAGE}:${TRITON_BASE_TAG} AS triton
8491

8592
FROM devel AS tritondevel
@@ -167,9 +174,14 @@ RUN chmod -R a+w examples && \
167174

168175
ARG GIT_COMMIT
169176
ARG TRT_LLM_VER
177+
ARG TARGETARCH
170178
ENV TRT_LLM_GIT_COMMIT=${GIT_COMMIT} \
171179
TRT_LLM_VERSION=${TRT_LLM_VER}
172180

181+
# Generate OSS attribution file for release image
182+
COPY scripts/generate_container_oss_attribution.sh /tmp/generate_container_oss_attribution.sh
183+
RUN bash /tmp/generate_container_oss_attribution.sh "release" "${TRT_LLM_VER}" "${TARGETARCH}" && rm /tmp/generate_container_oss_attribution.sh
184+
173185
FROM wheel AS tritonbuild
174186

175187
WORKDIR /src/tensorrt_llm

docker/common/install_ucx.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ UCX_INSTALL_PATH="/usr/local/ucx/"
66
CUDA_PATH="/usr/local/cuda"
77
UCX_REPO="https://github.com/openucx/ucx.git"
88

9+
mkdir -p /third-party-source
10+
911
rm -rf ${UCX_INSTALL_PATH}
1012
git clone --depth 1 -b ${UCX_VERSION} ${UCX_REPO}
13+
tar -czf /third-party-source/ucx-${UCX_VERSION}.tar.gz ucx
1114
cd ucx
1215
./autogen.sh
1316
./contrib/configure-release \
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Generate open source attribution file with parameterized URL
6+
# Usage: ./generate_container_oss_attribution.sh <image_name> <tag> <arch> [output_file]
7+
8+
show_usage() {
9+
local error_msg="${1}"
10+
11+
if [ -n "${error_msg}" ]; then
12+
echo "ERROR: ${error_msg}"
13+
echo ""
14+
fi
15+
16+
echo "Usage: $0 <image_name> <tag> <arch> [output_file]"
17+
echo ""
18+
echo "Arguments:"
19+
echo " image_name - Name of the image (e.g., tensorrt-llm)"
20+
echo " tag - Image tag/version (e.g., 1.0.0)"
21+
echo " arch - Architecture (e.g., amd64, arm64)"
22+
echo " output_file - Optional output file path (default: /third-party-source/NOTICE.txt)"
23+
echo ""
24+
echo "Example:"
25+
echo " $0 tensorrt-llm 1.0.0 amd64"
26+
echo ""
27+
exit 1
28+
}
29+
30+
IMAGE_NAME="${1}"
31+
TAG="${2}"
32+
ARCH="${3}"
33+
OUTPUT_FILE="/NOTICE.txt"
34+
35+
# Validate required parameters
36+
[ -z "${IMAGE_NAME}" ] && show_usage "Missing required parameter IMAGE_NAME"
37+
[ -z "${TAG}" ] && show_usage "Missing required parameter TAG"
38+
[ -z "${ARCH}" ] && show_usage "Missing required parameter ARCH"
39+
40+
# Construct the URL
41+
ROOT_URL="https://opensource.nvidia.com/oss/teams/nvidia"
42+
OSS_URL="${ROOT_URL}/${IMAGE_NAME}/${TAG}:linux-${ARCH}/index.html"
43+
44+
# Create output directory if needed
45+
OUTPUT_DIR="$(dirname "${OUTPUT_FILE}")"
46+
mkdir -p "${OUTPUT_DIR}"
47+
48+
# Generate the attribution file
49+
cat > "${OUTPUT_FILE}" << EOF
50+
This container image includes open-source software whose source code is archived in the /third-party-source directory or at ${OSS_URL}.
51+
52+
For further inquiries or assistance, contact us at [email protected]
53+
EOF
54+
55+
echo "✓ Attribution file generated: ${OUTPUT_FILE}"
56+
echo " URL: ${OSS_URL}"

0 commit comments

Comments
 (0)