From 9ce2af05bf341fca6096ec3c59bb1c4195972e21 Mon Sep 17 00:00:00 2001 From: Bibrak Qamar Chandio Date: Thu, 7 May 2026 19:27:41 +0000 Subject: [PATCH] ci: install NVTX headers in tracing-enabled CUDA containers NVTX tracing is not built by CI, so build breakages under --with-nvtx=... have been landing undetected. For example, the shared_ptr refactor in PR #1193 left an implicit pointer cast in tracing_impl/nvtx.h that no CI job caught. Extend the tracing-enabled Ubuntu images to install cuda-nvtx in addition to liblttng-ust-dev whenever ENABLE_CUDA is also set. The two tracing backends are independent in the plugin (separate HAVE_LIBLTTNG_UST and HAVE_NVTX_TRACING guards, each tracepoint macro expands to calls into both) so they coexist cleanly in a single container and a single build. Neuron images still get just lttng because NVTX requires the CUDA toolkit. No matrix, workflow, or tag changes: the existing 'lttng' tracing variant now also brings in NVTX on CUDA containers. A follow-up PR will add --with-nvtx=... to the configure line in distcheck.yaml so the plugin actually gets built with NVTX in CI. Signed-off-by: Bibrak Qamar Chandio --- docker/base/Dockerfile.ubuntu | 8 +++++++- docker/base/Dockerfile.ubuntu2404 | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docker/base/Dockerfile.ubuntu b/docker/base/Dockerfile.ubuntu index a971f6aba9..1834e192f4 100644 --- a/docker/base/Dockerfile.ubuntu +++ b/docker/base/Dockerfile.ubuntu @@ -76,10 +76,16 @@ RUN if [ "$ENABLE_CUDA" = "true" ]; then \ rm -rf /var/lib/apt/lists/*; \ fi -# Install lttng if enabled +# Install tracing packages if enabled. lttng is always installed +# when tracing is on; cuda-nvtx is added for CUDA-enabled images so +# the plugin can be configured with both --with-lttng and +# --with-nvtx=... and exercise both tracing backends together. RUN if [ "$ENABLE_TRACING" = "true" ]; then \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y liblttng-ust-dev && \ + if [ "$ENABLE_CUDA" = "true" ]; then \ + DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-nvtx-12-6 ; \ + fi && \ rm -rf /var/lib/apt/lists/*; \ fi diff --git a/docker/base/Dockerfile.ubuntu2404 b/docker/base/Dockerfile.ubuntu2404 index e1c2b551e8..079327eefe 100644 --- a/docker/base/Dockerfile.ubuntu2404 +++ b/docker/base/Dockerfile.ubuntu2404 @@ -46,9 +46,15 @@ RUN if [ "$ENABLE_CUDA" = "true" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-cudart-dev-12-6 cuda-crt-12-6 ; \ fi -# Install lttng if enabled +# Install tracing packages if enabled. lttng is always installed +# when tracing is on; cuda-nvtx is added for CUDA-enabled images so +# the plugin can be configured with both --with-lttng and +# --with-nvtx=... and exercise both tracing backends together. RUN if [ "$ENABLE_TRACING" = "true" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install -y liblttng-ust-dev ; \ + if [ "$ENABLE_CUDA" = "true" ]; then \ + DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-nvtx-12-6 ; \ + fi ; \ fi RUN rm -rf /var/lib/apt/lists/*