Skip to content
Merged
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
8 changes: 8 additions & 0 deletions CONTAINER_SOURCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Container Source Notices

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.

Generally, source archives for each image and its tags can be found at the below links:

* [TensorRT-LLM Release](https://opensource.nvidia.com/oss/teams/nvidia/release/index.html)
* [TensorRT-LLM Develop](https://opensource.nvidia.com/oss/teams/nvidia/devel/index.html)
12 changes: 12 additions & 0 deletions docker/Dockerfile.multi
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_ucx.sh && \
rm install_nixl.sh && \
rm install_etcd.sh

# Generate OSS attribution file for devel image
ARG TRT_LLM_VER
ARG TARGETARCH
COPY scripts/generate_container_oss_attribution.sh /tmp/generate_container_oss_attribution.sh
RUN bash /tmp/generate_container_oss_attribution.sh "devel" "${TRT_LLM_VER}" "${TARGETARCH}" && \
rm /tmp/generate_container_oss_attribution.sh

FROM ${TRITON_IMAGE}:${TRITON_BASE_TAG} AS triton

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

ARG GIT_COMMIT
ARG TRT_LLM_VER
ARG TARGETARCH
ENV TRT_LLM_GIT_COMMIT=${GIT_COMMIT} \
TRT_LLM_VERSION=${TRT_LLM_VER}

# Generate OSS attribution file for release image
COPY scripts/generate_container_oss_attribution.sh /tmp/generate_container_oss_attribution.sh
RUN bash /tmp/generate_container_oss_attribution.sh "release" "${TRT_LLM_VER}" "${TARGETARCH}" && rm /tmp/generate_container_oss_attribution.sh

FROM wheel AS tritonbuild

WORKDIR /src/tensorrt_llm
Expand Down
3 changes: 3 additions & 0 deletions docker/common/install_ucx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ UCX_INSTALL_PATH="/usr/local/ucx/"
CUDA_PATH="/usr/local/cuda"
UCX_REPO="https://github.com/openucx/ucx.git"

mkdir -p /third-party-source

rm -rf ${UCX_INSTALL_PATH}
git clone --depth 1 -b ${UCX_VERSION} ${UCX_REPO}
tar -czf /third-party-source/ucx-${UCX_VERSION}.tar.gz ucx
cd ucx
./autogen.sh
./contrib/configure-release \
Expand Down
56 changes: 56 additions & 0 deletions scripts/generate_container_oss_attribution.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

set -e

# Generate open source attribution file with parameterized URL
# Usage: ./generate_container_oss_attribution.sh <image_name> <tag> <arch> [output_file]

show_usage() {
local error_msg="${1}"

if [ -n "${error_msg}" ]; then
echo "ERROR: ${error_msg}"
echo ""
fi

echo "Usage: $0 <image_name> <tag> <arch> [output_file]"
echo ""
echo "Arguments:"
echo " image_name - Name of the image (e.g., tensorrt-llm)"
echo " tag - Image tag/version (e.g., 1.0.0)"
echo " arch - Architecture (e.g., amd64, arm64)"
echo " output_file - Optional output file path (default: /third-party-source/NOTICE.txt)"
echo ""
echo "Example:"
echo " $0 tensorrt-llm 1.0.0 amd64"
echo ""
exit 1
}

IMAGE_NAME="${1}"
TAG="${2}"
ARCH="${3}"
OUTPUT_FILE="/NOTICE.txt"

# Validate required parameters
[ -z "${IMAGE_NAME}" ] && show_usage "Missing required parameter IMAGE_NAME"
[ -z "${TAG}" ] && show_usage "Missing required parameter TAG"
[ -z "${ARCH}" ] && show_usage "Missing required parameter ARCH"

# Construct the URL
ROOT_URL="https://opensource.nvidia.com/oss/teams/nvidia"
OSS_URL="${ROOT_URL}/${IMAGE_NAME}/${TAG}:linux-${ARCH}/index.html"

# Create output directory if needed
OUTPUT_DIR="$(dirname "${OUTPUT_FILE}")"
mkdir -p "${OUTPUT_DIR}"

# Generate the attribution file
cat > "${OUTPUT_FILE}" << EOF
This container image includes open-source software whose source code is archived in the /third-party-source directory or at ${OSS_URL}.

For further inquiries or assistance, contact us at [email protected]
EOF

echo "✓ Attribution file generated: ${OUTPUT_FILE}"
echo " URL: ${OSS_URL}"