Skip to content

Commit a5956cd

Browse files
authored
install-nsight-systems.sh: run conditionally (#1496)
1 parent 4a8f06a commit a5956cd

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/container/Dockerfile.base

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ARG GIT_USER_NAME="JAX Toolbox"
44
55
ARG CLANG_VERSION=18
66
ARG JAX_TOOLBOX_REF=main
7+
ARG NSIGHT_SYSTEMS_VERSION_OVERRIDE
78

89
###############################################################################
910
## Build base image
@@ -15,6 +16,7 @@ ARG GIT_USER_EMAIL
1516
ARG GIT_USER_NAME
1617
ARG CLANG_VERSION
1718
ARG JAX_TOOLBOX_REF
19+
ARG NSIGHT_SYSTEMS_VERSION_OVERRIDE
1820
ENV CUDA_BASE_IMAGE=${BASE_IMAGE}
1921

2022
###############################################################################
@@ -167,7 +169,7 @@ ADD jax-nccl-test parallel-launch /usr/local/bin/
167169
##############################################################################
168170

169171
ADD install-nsight-systems.sh /usr/local/bin
170-
RUN install-nsight-systems.sh
172+
RUN if [[ -n "${NSIGHT_SYSTEMS_VERSION_OVERRIDE}" ]]; then install-nsight-systems.sh "${NSIGHT_SYSTEMS_VERSION_OVERRIDE}"; fi
171173

172174
###############################################################################
173175
## Install the nsys-jax JAX/XLA-aware profiling scripts, patch Nsight Systems

.github/container/install-nsight-systems.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22
set -exuo pipefail
33

4+
version=$1
5+
if [[ -z "${version}" ]]; then
6+
echo "Usage: $0 major.minor.patch"
7+
exit 1
8+
fi
9+
410
# Remove the symlink that makes `nsys` refer to the CUDA-bundled version:
511
rm /usr/local/cuda/bin/nsys
612

@@ -15,7 +21,7 @@ export DEBIAN_FRONTEND=noninteractive
1521
export TZ=America/Los_Angeles
1622

1723
apt-get update
18-
apt-get install -y nsight-systems-cli-2025.3.1
24+
apt-get install -y nsight-systems-cli-${version}
1925
apt-get clean
2026

2127
rm -rf /var/lib/apt/lists/*

.github/workflows/_build_base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
GIT_USER_EMAIL=${{ inputs.GIT_USER_EMAIL }}
136136
BUILD_DATE=${{ inputs.BUILD_DATE }}
137137
JAX_TOOLBOX_REF=${{ github.head_ref || github.sha }}
138+
NSIGHT_SYSTEMS_VERSION_OVERRIDE=2025.3.1
138139
${{ inputs.BASE_IMAGE != 'latest' && format('BASE_IMAGE={0}', inputs.BASE_IMAGE) || '' }}
139140
140141
- name: Generate sitrep

0 commit comments

Comments
 (0)