Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
default: true

jobs:
build:
build-cuda-samples:
runs-on: linux-amd64-cpu4
strategy:
matrix:
Expand All @@ -38,11 +38,15 @@ jobs:
- vectorAdd
- nbody
- deviceQuery
- nvbandwidth
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think it belongs here. It is a separate build/Dockerfile. I added another cuda-sample that should go here. See this #18

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does, see the structure of the GitHub action and how Evan is creating a new Make target

exclude:
- dist: ubi9
sample: deviceQuery
- dist: ubi9
sample: nbody
- dist: ubi9
sample: nvbandwidth

steps:
- uses: actions/checkout@v4
name: Check out code
Expand All @@ -62,7 +66,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image
- name: Build cuda sample image
env:
IMAGE_NAME: ghcr.io/nvidia/k8s-samples
VERSION: ${{ inputs.version }}
Expand Down
3 changes: 2 additions & 1 deletion deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ endif
endif

build-%: DIST = $(*)
ifeq ($(SAMPLE),nbody)
# For the following samples, we use specific Dockerfiles:
ifeq ($(SAMPLE),$(filter $(SAMPLE),nbody nvbandwidth))
build-%: DOCKERFILE = $(CURDIR)/deployments/container/$(SAMPLE)/Dockerfile
else
build-%: DOCKERFILE = $(CURDIR)/deployments/container/Dockerfile.$(DOCKERFILE_SUFFIX)
Expand Down
44 changes: 44 additions & 0 deletions deployments/container/nvbandwidth/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM nvcr.io/nvidia/cuda:12.6.2-devel-ubuntu22.04 AS builder

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
cmake \
g++ \
gcc \
make \
libboost-program-options-dev \
openmpi-bin \
openmpi-common \
libopenmpi-dev && \
rm -rf /var/lib/apt/lists/*

WORKDIR /bandwidthtest

ARG NVBANDWIDTH_VERSION=v0.7

RUN git clone --branch ${NVBANDWIDTH_VERSION} --depth 1 --single-branch https://github.com/NVIDIA/nvbandwidth.git && \
cd nvbandwidth && \
cmake -DMULTINODE=1 . && \
make -j$(nproc)

FROM mpioperator/openmpi:v0.6.0

COPY --from=builder /bandwidthtest/nvbandwidth/nvbandwidth /usr/bin

Loading