Skip to content
Open
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ $(DRIVER_BUILD_TARGETS):
$(CURDIR)/$(SUBDIR)

build-rhcos%: SUBDIR = rhel9
build-rhel9%: SUBDIR = rhel9

build-rocky9%: SUBDIR = rhel9
build-rocky9%: DOCKER_BUILD_ARGS = --build-arg BASE_IMAGE=nvcr.io/nvidia/cuda:13.1.1-base-rockylinux9
Expand Down Expand Up @@ -249,6 +250,7 @@ build-vgpuguest-%: DRIVER_TAG = $(DRIVER_VERSION:-grid=)

# Source of truth for RHEL and CoreOS compatibility https://access.redhat.com/articles/6907891
build-vgpuguest-rhcos%: SUBDIR = rhel9
build-vgpuguest-rhel9%: SUBDIR = rhel9


$(VGPU_GUEST_DRIVER_BUILD_TARGETS):
Expand Down Expand Up @@ -288,6 +290,7 @@ build-vgpuhost-%: DOCKERFILE = $(CURDIR)/vgpu-manager/$(SUBDIR)/Dockerfile

# Source of truth for RHEL and CoreOS compatibility https://access.redhat.com/articles/6907891
build-vgpuhost-rhcos%: SUBDIR = rhel9
build-vgpuhost-rhel9%: SUBDIR = rhel9

$(VGPU_HOST_DRIVER_BUILD_TARGETS):
DOCKER_BUILDKIT=1 \
Expand Down
8 changes: 8 additions & 0 deletions vgpu-manager/rhel9/ocp_dtk_entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ nv-ctr-run-with-dtk() {
/usr/local/bin/ocp_dtk_entrypoint \
/usr/local/bin/nvidia-driver \
/usr/sbin/lspci \
/usr/sbin/setpci \
/driver \
"$DRIVER_TOOLKIT_SHARED_DIR/"

# Copy pciutils library dependencies for the DTK container
# (the DTK image does not have libpci, and dnf fallback fails in air-gapped networks)
mkdir -p "$DRIVER_TOOLKIT_SHARED_DIR/lib64"
cp /usr/lib64/libpci.so* "$DRIVER_TOOLKIT_SHARED_DIR/lib64/"
Copy link
Contributor

Choose a reason for hiding this comment

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

Question -- do we know if libpci.so will always be installed at /usr/lib64?

Copy link
Author

Choose a reason for hiding this comment

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

Specifically for RHEL9 this is the standard library path and should be the same. But there may be a better approach to find this dynamically for compatibility against other OS versions or architectures.

This change just allowed us to make progress in accessing libpci within the vgpu-manager image at runtime.


env | sed 's/=/="/' | sed 's/$/"/' > "$DRIVER_TOOLKIT_SHARED_DIR/env"

touch "$DRIVER_TOOLKIT_SHARED_DIR/dir_prepared"
Expand Down Expand Up @@ -108,9 +114,11 @@ dtk-build-driver() {
cp -v \
"$DRIVER_TOOLKIT_SHARED_DIR/nvidia-driver" \
"$DRIVER_TOOLKIT_SHARED_DIR/lspci" \
"$DRIVER_TOOLKIT_SHARED_DIR/setpci" \
"${DRIVER_TOOLKIT_SHARED_DIR}/bin"

export PATH="${DRIVER_TOOLKIT_SHARED_DIR}/bin:$PATH";
export LD_LIBRARY_PATH="${DRIVER_TOOLKIT_SHARED_DIR}/lib64:${LD_LIBRARY_PATH:-}";

# ensure lspci is installed, as 'sriov-manage' script requires it
if ! $(lspci >/dev/null); then
Expand Down