Skip to content

Commit 80489a3

Browse files
committed
Bump CUDA samples version to v12.9
This commit includes changes to how the sample binaries are built. Starting with the v12.8 tag of the CUDA samples repository, CMake is the new build system. Reference: https://github.com/NVIDIA/cuda-samples/releases/tag/v12.8 Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
1 parent 7c5b349 commit 80489a3

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

deployments/container/Dockerfile.ubi9

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@ FROM nvcr.io/nvidia/cuda:12.9.1-devel-ubi9 AS builder
1616

1717
ARG CUDA_VERSION
1818
RUN dnf install -y --allowerasing \
19-
curl \
19+
curl cmake \
2020
&& \
2121
dnf clean all
2222

2323
WORKDIR /build
2424

2525
ARG SAMPLE_NAME
2626
ENV SAMPLE_NAME ${SAMPLE_NAME}
27-
ARG CUDA_SAMPLES_VERSION=v12.0
27+
ARG CUDA_SAMPLES_VERSION=v12.9
2828
RUN curl -L https://codeload.github.com/NVIDIA/cuda-samples/tar.gz/refs/tags/${CUDA_SAMPLES_VERSION} | \
2929
tar -xzvf - --strip-components=1 --wildcards */${SAMPLE_NAME}/* --wildcards */Common/* && \
3030
cd $(find /build/Samples -iname "${SAMPLE_NAME}") && \
31-
make build && \
32-
cp $(find /build/bin -iname "${SAMPLE_NAME}") /build/${SAMPLE_NAME}
31+
cmake . && \
32+
make && \
33+
cp ${SAMPLE_NAME} /build/${SAMPLE_NAME}
3334

3435
FROM nvcr.io/nvidia/cuda:12.9.1-base-ubi9
3536
ARG SAMPLE_NAME

deployments/container/Dockerfile.ubuntu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ ENV SAMPLE_NAME ${SAMPLE_NAME}
1919

2020
ARG DEBIAN_FRONTEND=noninteractive
2121
RUN apt-get update && apt-get install -y --no-install-recommends \
22-
curl \
22+
curl cmake \
2323
&& \
2424
rm -rf /var/lib/apt/lists/*
2525

2626
WORKDIR /build
2727

2828
ARG TARGETARCH
2929

30-
ARG CUDA_SAMPLES_VERSION=v12.0
30+
ARG CUDA_SAMPLES_VERSION=v12.9
3131
RUN curl -L https://codeload.github.com/NVIDIA/cuda-samples/tar.gz/refs/tags/${CUDA_SAMPLES_VERSION} | \
3232
tar -xzvf - --strip-components=1 --wildcards */${SAMPLE_NAME}/* --wildcards */Common/* && \
3333
cd $(find /build/Samples -iname "${SAMPLE_NAME}") && \
34-
make build && \
35-
cp $(find /build/bin -iname "${SAMPLE_NAME}") /build/${SAMPLE_NAME}
34+
cmake . && \
35+
make && \
36+
cp ${SAMPLE_NAME} /build/${SAMPLE_NAME}
3637

3738
FROM nvcr.io/nvidia/cuda:12.9.1-base-ubuntu22.04
3839
ARG SAMPLE_NAME=nbody

deployments/container/nbody/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2626
freeglut3-dev \
2727
libgl1-mesa-dev \
2828
libglu1-mesa-dev \
29+
cmake \
2930
&& \
3031
rm -rf /var/lib/apt/lists/*
3132

3233
WORKDIR /build
3334

3435
ARG TARGETARCH
3536

36-
ARG CUDA_SAMPLES_VERSION=v12.0
37+
ARG CUDA_SAMPLES_VERSION=v12.9
3738
RUN curl -L https://codeload.github.com/NVIDIA/cuda-samples/tar.gz/refs/tags/${CUDA_SAMPLES_VERSION} | \
3839
tar -xzvf - --strip-components=1 --wildcards */${SAMPLE_NAME}/* --wildcards */Common/* && \
3940
cd $(find /build/Samples -iname "${SAMPLE_NAME}") && \
40-
make build && \
41-
cp $(find /build/bin -iname "${SAMPLE_NAME}") /build/${SAMPLE_NAME}
41+
cmake . && \
42+
make && \
43+
cp ${SAMPLE_NAME} /build/${SAMPLE_NAME}
4244

4345
FROM nvcr.io/nvidia/cuda:12.9.1-base-ubuntu22.04
4446
ARG SAMPLE_NAME

versions.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ VERSION ?= cuda$(shell grep -Eo "FROM.*cuda:[0-9\.]+" deployments/container/Doc
1717

1818
# Specify the tag for the https://github.com/NVIDIA/cuda-samples repository.
1919
# This need not match the CUDA_VERSION above.
20-
CUDA_SAMPLES_VERSION := v12.0
20+
CUDA_SAMPLES_VERSION := v12.9
2121

2222
ifeq ($(IMAGE_NAME),)
2323
REGISTRY ?= nvcr.io/nvidia/k8s

0 commit comments

Comments
 (0)