-
Notifications
You must be signed in to change notification settings - Fork 78
[Question]: I'm using rocky 9.7, is it possible to build a vGPU-manager and vGPU-Hostdriver? #669
Copy link
Copy link
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I'm using rocky 9.7, is it possible to build a vgpu-manager and vGPU-Hostdriver?
I'm trying to build a vGPU-Manager that includes a vGPU-Hostdriver and use kubevirt with GPU-operator.
However, build-vgpuhost for building vGPU-Host-Driver does not exist.
I'm trying to build with vGPU-Host-Driver and I found that there is rocky9 RULE in the DISTRIBUTIONS variable in Makefile.
# $(VGPU_HOST_DRIVER_BUILD_TARGETS) is in the form of build-vgpuhost-$(DIST)
# The vGPU host driver .run file is assumed to be present in the $SUBDIR/drivers/ directory.
# VGPU_HOST_DRIVER_VERSION must be defined in the environment when invoking this target.
VGPU_HOST_DRIVER_VERSION ?= ""
build-vgpuhost-%: $(if $(VGPU_HOST_DRIVER_VERSION),,$(error "VGPU_HOST_DRIVER_VERSION is not set"))
build-vgpuhost-%: DRIVER_VERSION := $(VGPU_HOST_DRIVER_VERSION)
build-vgpuhost-%: DRIVER_BRANCH = $(word 1,$(subst ., ,${DRIVER_VERSION}))
build-vgpuhost-%: DIST = $(word 3,$(subst -, ,$@))
build-vgpuhost-%: SUBDIR = $(word 3,$(subst -, ,$@))
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
$(VGPU_HOST_DRIVER_BUILD_TARGETS):
DOCKER_BUILDKIT=1 \
$(DOCKER) $(BUILDX) build --pull \
$(DOCKER_BUILD_OPTIONS) \
$(DOCKER_BUILD_PLATFORM_OPTIONS) \
--tag $(IMAGE) \
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
--build-arg DRIVER_VERSION="$(DRIVER_VERSION)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg CVE_UPDATES="$(CVE_UPDATES)" \
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
$(DOCKER_BUILD_ARGS) \
--file $(DOCKERFILE) \
$(CURDIR)/vgpu-manager/$(SUBDIR)
# $(VGPU_HOST_DRIVER_PUSH_TARGETS) is in the form of push-vgpuhost-$(DIST)
# VGPU_HOST_DRIVER_VERSION must be defined in the environment when invoking this target.
push-vgpuhost-%: $(if $(VGPU_HOST_DRIVER_VERSION),,$(error "VGPU_HOST_DRIVER_VERSION is not set"))
push-vgpuhost-%: DRIVER_TAG = $(VGPU_HOST_DRIVER_VERSION)
push-vgpuhost-%: DIST = $(word 3,$(subst -, ,$@))rocky9 seems to exist only in normal drivers, not vgpu-host drivers.
# $(DRIVER_BUILD_TARGETS) is in the form of build-$(DIST)-$(DRIVER_VERSION)
# Parse the target to set the required variables.
build-%: DIST = $(word 2,$(subst -, ,$@))
build-%: DRIVER_VERSION = $(word 3,$(subst -, ,$@))
build-%: DRIVER_BRANCH = $(word 1,$(subst ., ,${DRIVER_VERSION}))
build-%: SUBDIR = $(word 2,$(subst -, ,$@))
build-%: DOCKERFILE = $(CURDIR)/$(SUBDIR)/Dockerfile
# Both ubuntu20.04 and build-ubuntu20.04 trigger a build of all driver images for ubuntu20.04
# build-ubuntu20.04-$(DRIVER_VERSION) triggers a build for a specific $(DRIVER_VERSION)
$(DISTRIBUTIONS): %: build-%
$(BUILD_TARGETS): %: $(foreach driver_version, $(DRIVER_VERSIONS), $(addprefix %-, $(driver_version)))
$(DRIVER_BUILD_TARGETS):
DOCKER_BUILDKIT=1 \
$(DOCKER) $(BUILDX) build --pull \
$(DOCKER_BUILD_OPTIONS) \
$(DOCKER_BUILD_PLATFORM_OPTIONS) \
--tag $(IMAGE) \
--build-arg DRIVER_VERSION="$(DRIVER_VERSION)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
--build-arg CVE_UPDATES="$(CVE_UPDATES)" \
$(DOCKER_BUILD_ARGS) \
--file $(DOCKERFILE) \
$(CURDIR)/$(SUBDIR)
build-rhcos%: SUBDIR = rhel9
build-rocky9%: SUBDIR = rhel9
build-rocky9%: DOCKER_BUILD_ARGS = --build-arg BASE_IMAGE=nvcr.io/nvidia/cuda:13.1.1-base-rockylinux9Can't rocky9.7 be used as vGPU-Hostdriver?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested