mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 14:07:21 +08:00
[None][infra] Add container notices and documentation (#9185)
Signed-off-by: Parker Drake <pdrake@nvidia.com>
This commit is contained in:
parent
041bb32151
commit
cee7071e27
8
CONTAINER_SOURCE.md
Normal file
8
CONTAINER_SOURCE.md
Normal file
@ -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)
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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 \
|
||||
|
||||
56
scripts/generate_container_oss_attribution.sh
Executable file
56
scripts/generate_container_oss_attribution.sh
Executable file
@ -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 oss-requests@nvidia.com
|
||||
EOF
|
||||
|
||||
echo "✓ Attribution file generated: ${OUTPUT_FILE}"
|
||||
echo " URL: ${OSS_URL}"
|
||||
Loading…
Reference in New Issue
Block a user