From 6e515149dfddae05ad467d1a31367cd1b9ec1d9a Mon Sep 17 00:00:00 2001 From: Vitaliy Emporopulo Date: Mon, 28 Jul 2025 13:39:39 +0300 Subject: [PATCH] Include lspci in vgpu-manager image In disconnected environments `dnf install` cannot be used without mirroring RPM repositories. As the vGPU manager now requires lspci command: * Include the RPMs in the container image * If lspci command not found, install it from the RPMs Signed-off-by: Vitaliy Emporopulo --- vgpu-manager/rhel8/Dockerfile | 6 +++++- vgpu-manager/rhel8/ocp_dtk_entrypoint | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vgpu-manager/rhel8/Dockerfile b/vgpu-manager/rhel8/Dockerfile index da9c12f2..c1e44a22 100644 --- a/vgpu-manager/rhel8/Dockerfile +++ b/vgpu-manager/rhel8/Dockerfile @@ -5,7 +5,11 @@ ENV DRIVER_VERSION=$DRIVER_VERSION ARG DRIVER_ARCH=x86_64 ENV DRIVER_ARCH=$DRIVER_ARCH -RUN mkdir -p /driver +RUN mkdir -p /driver/rpms/pciutils +WORKDIR /driver/rpms/pciutils + +RUN dnf download --resolve pciutils && dnf clean all + WORKDIR /driver COPY NVIDIA-Linux-${DRIVER_ARCH}-${DRIVER_VERSION}-vgpu-kvm.run . RUN chmod +x NVIDIA-Linux-${DRIVER_ARCH}-${DRIVER_VERSION}-vgpu-kvm.run diff --git a/vgpu-manager/rhel8/ocp_dtk_entrypoint b/vgpu-manager/rhel8/ocp_dtk_entrypoint index e5d502f5..f6cbca32 100755 --- a/vgpu-manager/rhel8/ocp_dtk_entrypoint +++ b/vgpu-manager/rhel8/ocp_dtk_entrypoint @@ -100,7 +100,7 @@ dtk-build-driver() { # ensure lspci is installed, as 'sriov-manage' script requires it if ! $(lspci >/dev/null); then - dnf install -y pciutils && rm -rf /var/cache/yum/* + rpm -ivh ${DRIVER_TOOLKIT_SHARED_DIR}/driver/rpms/pciutils/*.rpm fi # upon catching a signal, terminate child process to trigger driver cleanup