From 1e0c7587e10f3f085b91b3dac98a692cca1e6bb5 Mon Sep 17 00:00:00 2001 From: Neal Vaidya Date: Fri, 31 Jul 2026 14:44:22 -0700 Subject: [PATCH 1/2] fix(examples): update Triton example to CUDA 13-compatible image (DYN-3697) Bump default TRITON_SERVER_IMAGE from tritonserver:25.01-py3 (CUDA 12.8) to tritonserver:25.10-py3 (CUDA 13.0.2) to match the CUDA 13-only Dynamo base image produced by container/render.py. The old image's triton_bindings linked against libcudart.so.12, which is absent in the CUDA 13 environment, causing the worker to fail on import before model registration. Also make the DCGM library copy tolerant of releases where /usr/local/dcgm is absent, and add a build-time `import tritonserver` check so future ABI mismatches fail the image build rather than producing a silently broken image. Signed-off-by: Neal Vaidya --- examples/backends/tritonserver/Dockerfile | 10 ++++++++-- examples/backends/tritonserver/README.md | 15 ++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/examples/backends/tritonserver/Dockerfile b/examples/backends/tritonserver/Dockerfile index 18c7c356fbbe..b8ba1ddc0ee6 100644 --- a/examples/backends/tritonserver/Dockerfile +++ b/examples/backends/tritonserver/Dockerfile @@ -2,15 +2,19 @@ # SPDX-License-Identifier: Apache-2.0 ARG DYNAMO_BASE_IMAGE="dynamo-base:latest" -ARG TRITON_SERVER_IMAGE="nvcr.io/nvidia/tritonserver:25.01-py3" +ARG TRITON_SERVER_IMAGE="nvcr.io/nvidia/tritonserver:25.10-py3" FROM ${TRITON_SERVER_IMAGE} AS triton_source +# Ensure DCGM directory exists so COPY never fails when the source image omits it +RUN mkdir -p /usr/local/dcgm FROM ${DYNAMO_BASE_IMAGE} AS dynamo_base COPY --from=triton_source /opt/tritonserver /opt/tritonserver COPY --from=triton_source /usr/local/dcgm /usr/local/dcgm -COPY --from=triton_source /lib/x86_64-linux-gnu/libdcgm*.so* /lib/x86_64-linux-gnu/ +# libdcgm may not be present in all Triton releases; copy only when found +RUN --mount=type=bind,from=triton_source,source=/lib/x86_64-linux-gnu,target=/triton_lib \ + find /triton_lib -name "libdcgm*.so*" -exec cp -a {} /lib/x86_64-linux-gnu/ \; 2>/dev/null || true ENV BACKEND_DIR=/opt/tritonserver/backends ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/opt/tritonserver/lib:/opt/tritonserver/backends:/usr/local/dcgm/lib64 ENV PATH=/opt/tritonserver/bin:$PATH @@ -24,3 +28,5 @@ USER dynamo RUN uv pip install --no-cache-dir tritonclient[grpc] RUN uv pip install /opt/tritonserver/python/triton*.whl +# Validate CUDA ABI compatibility at build time +RUN python3 -c "import tritonserver" diff --git a/examples/backends/tritonserver/README.md b/examples/backends/tritonserver/README.md index 74c6d18bedb0..3f731bbea8c6 100644 --- a/examples/backends/tritonserver/README.md +++ b/examples/backends/tritonserver/README.md @@ -38,21 +38,26 @@ This example shows how to run Triton Server models through Dynamo's distributed From the Dynamo repository root: ```bash -# Build the base Dynamo image +# Build the base Dynamo image (CUDA 13.0) python container/render.py --framework=dynamo --target=runtime --output-short-filename docker build -f container/rendered.Dockerfile -t dynamo-base:latest . -# Build the Triton worker image -cd examples/backends/tritonserver -docker build -t dynamo-triton:latest . +# Build the Triton worker image (defaults to tritonserver:25.10-py3, CUDA 13-compatible) +docker build \ + --build-arg DYNAMO_BASE_IMAGE=dynamo-base:latest \ + -t dynamo-triton:latest \ + examples/backends/tritonserver/ ``` +> [!NOTE] +> The default `TRITON_SERVER_IMAGE` is `nvcr.io/nvidia/tritonserver:25.10-py3` + #### Step 2: Run the Container ```bash docker run --rm -it --gpus all --network host \ dynamo-triton:latest \ - ./examples/backends/tritonserver/launch/identity.sh + /workspace/launch/identity.sh ``` #### Step 3: Test the Deployment From 9208022195f6bd746430c5cfcf96da0fb6994104 Mon Sep 17 00:00:00 2001 From: Neal Vaidya Date: Mon, 3 Aug 2026 16:52:44 +0000 Subject: [PATCH 2/2] fix(examples): fix libdcgm copy in Triton Dockerfile for 25.10 (DYN-3697) Triton 25.10 ships libdcgm.so.4 under /usr/lib/x86_64-linux-gnu (the merged-usr convention) rather than /lib/x86_64-linux-gnu. Update the bind-mount source accordingly and add USER root before the copy so the dynamo-base non-root user does not cause a permission-denied failure. Co-Authored-By: Claude Sonnet 4.6 (1M context) Signed-off-by: Neal Vaidya --- examples/backends/tritonserver/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/backends/tritonserver/Dockerfile b/examples/backends/tritonserver/Dockerfile index b8ba1ddc0ee6..9c84bb75d64f 100644 --- a/examples/backends/tritonserver/Dockerfile +++ b/examples/backends/tritonserver/Dockerfile @@ -12,9 +12,9 @@ FROM ${DYNAMO_BASE_IMAGE} AS dynamo_base COPY --from=triton_source /opt/tritonserver /opt/tritonserver COPY --from=triton_source /usr/local/dcgm /usr/local/dcgm -# libdcgm may not be present in all Triton releases; copy only when found -RUN --mount=type=bind,from=triton_source,source=/lib/x86_64-linux-gnu,target=/triton_lib \ - find /triton_lib -name "libdcgm*.so*" -exec cp -a {} /lib/x86_64-linux-gnu/ \; 2>/dev/null || true +USER root +RUN --mount=type=bind,from=triton_source,source=/usr/lib/x86_64-linux-gnu,target=/triton_usr_lib \ + find /triton_usr_lib -name "libdcgm*.so*" -exec cp -a {} /lib/x86_64-linux-gnu/ \; ENV BACKEND_DIR=/opt/tritonserver/backends ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/opt/tritonserver/lib:/opt/tritonserver/backends:/usr/local/dcgm/lib64 ENV PATH=/opt/tritonserver/bin:$PATH