Skip to content

Commit 563231e

Browse files
authored
Dockerfile.base: install newer nsys (#1488)
Installation script revived from #1248. This fixes `nsys-jax` test failures introduced by #1469.
1 parent 5436a5d commit 563231e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/container/Dockerfile.base

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ RUN install-nccl-sanity-check.sh
162162
ADD jax-nccl-test parallel-launch /usr/local/bin/
163163

164164

165+
##############################################################################
166+
## Install a newer Nsight Systems version than is included in cuda-dl-base
167+
##############################################################################
168+
169+
ADD install-nsight-systems.sh /usr/local/bin
170+
RUN install-nsight-systems.sh
171+
165172
###############################################################################
166173
## Install the nsys-jax JAX/XLA-aware profiling scripts, patch Nsight Systems
167174
###############################################################################
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -exuo pipefail
3+
4+
# Remove the symlink that makes `nsys` refer to the CUDA-bundled version:
5+
rm /usr/local/cuda/bin/nsys
6+
7+
# Repo for newer nsight versions
8+
UBUNTU_ARCH=$(dpkg --print-architecture)
9+
UBUNTU_VERSION=$(. /etc/os-release && echo ${ID}${VERSION_ID/./}) # e.g. ubuntu2204
10+
DEVTOOLS_URL=https://developer.download.nvidia.com/devtools/repos/${UBUNTU_VERSION}/${UBUNTU_ARCH}
11+
curl -o /usr/share/keyrings/nvidia.pub "${DEVTOOLS_URL}/nvidia.pub"
12+
echo "deb [signed-by=/usr/share/keyrings/nvidia.pub] ${DEVTOOLS_URL}/ /" > /etc/apt/sources.list.d/devtools-${UBUNTU_VERSION}-${UBUNTU_ARCH}.list
13+
14+
export DEBIAN_FRONTEND=noninteractive
15+
export TZ=America/Los_Angeles
16+
17+
apt-get update
18+
apt-get install -y nsight-systems-cli-2025.3.1
19+
apt-get clean
20+
21+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)