Skip to content

Commit 7afe42a

Browse files
authored
Merge pull request #286 from NVIDIA/builvgpu-manager
Update the building of vgpu manager build doc
2 parents eca15b5 + fb17003 commit 7afe42a

File tree

2 files changed

+23
-35
lines changed

2 files changed

+23
-35
lines changed

gpu-operator/gpu-operator-kubevirt.rst

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -537,43 +537,36 @@ Open a terminal and clone the driver container image repository.
537537
$ git clone https://github.com/NVIDIA/gpu-driver-container.git
538538
$ cd gpu-driver-container
539539
540-
Change to the vgpu-manager directory for your OS. We use Ubuntu 20.04 as an example.
540+
#. Copy the NVIDIA vGPU manager from your extracted ZIP file to the operating system version you want to build the image for:
541+
* We use Ubuntu 22.04 as an example.
541542

542-
.. code-block:: console
543-
544-
$ cd vgpu-manager/ubuntu20.04
545-
546-
.. note::
543+
Copy ``<local-driver-download-directory>/\*-vgpu-kvm.run`` to ``vgpu-manager/ubuntu22.04/``.
547544

548-
For Red Hat OpenShift, run ``cd vgpu-manager/rhel8`` to use the ``rhel8`` folder instead.
545+
.. code-block:: console
549546
550-
Copy the NVIDIA vGPU Manager from your extracted zip file
547+
$ cp <local-driver-download-directory>/*-vgpu-kvm.run vgpu-manager/ubuntu22.04/
551548
552-
.. code-block:: console
549+
.. note::
553550

554-
$ cp <local-driver-download-directory>/*-vgpu-kvm.run ./
551+
For Red Hat OpenShift, use a directory that includes ``rhel`` in the directory name. For example, ``vgpu-manager/rhel8``.
555552

556553
| Set the following environment variables:
557554
| ``PRIVATE_REGISTRY`` - name of private registry used to store driver image
558-
| ``VERSION`` - NVIDIA vGPU Manager version downloaded from NVIDIA Software Portal
559-
| ``OS_TAG`` - this must match the Guest OS version. In the following example ``ubuntu20.04`` is used. For Red Hat OpenShift this should be set to ``rhcos4.x`` where x is the supported minor OCP version.
560-
| ``CUDA_VERSION`` - CUDA base image version to build the driver image with.
555+
| ``VGPU_HOST_DRIVER_VERSION`` - NVIDIA vGPU Manager version downloaded from NVIDIA Software Portal
556+
| ``OS_TAG`` - this must match the Guest OS version. In the following example ``ubuntu22.04`` is used. For Red Hat OpenShift this should be set to ``rhcos4.x`` where x is the supported minor OCP version.
561557
562558
.. code-block:: console
563559
564-
$ export PRIVATE_REGISTRY=my/private/registry VERSION=510.73.06 OS_TAG=ubuntu20.04 CUDA_VERSION=11.7.1
560+
$ export PRIVATE_REGISTRY=my/private/registry VGPU_HOST_DRIVER_VERSION=580.82.07 OS_TAG=ubuntu22.04
565561
566562
Build the NVIDIA vGPU Manager image.
567563

568564
.. code-block:: console
569565
570-
$ docker build \
571-
--build-arg DRIVER_VERSION=${VERSION} \
572-
--build-arg CUDA_VERSION=${CUDA_VERSION} \
573-
-t ${PRIVATE_REGISTRY}/vgpu-manager:${VERSION}-${OS_TAG} .
566+
$ VGPU_HOST_DRIVER_VERSION=${VGPU_HOST_DRIVER_VERSION} IMAGE_NAME=${PRIVATE_REGISTRY}/vgpu-manager make build-vgpuhost-${OS_TAG}
574567
575568
Push NVIDIA vGPU Manager image to your private registry.
576569

577570
.. code-block:: console
578571
579-
$ docker push ${PRIVATE_REGISTRY}/vgpu-manager:${VERSION}-${OS_TAG}
572+
$ VGPU_HOST_DRIVER_VERSION=${VGPU_HOST_DRIVER_VERSION} IMAGE_NAME=${PRIVATE_REGISTRY}/vgpu-manager make push-vgpuhost-${OS_TAG}

openshift/openshift-virtualization.rst

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -248,28 +248,25 @@ Use the following steps to build the vGPU Manager container and push it to a pri
248248
$ git clone https://github.com/NVIDIA/gpu-driver-container.git
249249
$ cd gpu-driver-container
250250
251-
#. Change to the ``vgpu-manager`` directory for your OS:
251+
#. Copy the NVIDIA vGPU manager from your extracted ZIP file to the operating system version you want to build the image for:
252+
* We use RHEL 8 as an example.
252253

253-
.. code-block:: console
254-
255-
$ cd vgpu-manager/rhel8
256-
257-
#. Copy the NVIDIA vGPU Manager from your extracted zip file:
254+
Copy ``<local-driver-download-directory>/\*-vgpu-kvm.run`` to ``vgpu-manager/rhel8/``.
258255

259256
.. code-block:: console
260257
261-
$ cp <local-driver-download-directory>/*-vgpu-kvm.run ./
258+
$ cp <local-driver-download-directory>/*-vgpu-kvm.run vgpu-manager/rhel8/
262259
263260
#. Set the following environment variables.
264261

265262
* ``PRIVATE_REGISTRY`` - Name of the private registry used to store the driver image.
266-
* ``VERSION`` - The NVIDIA vGPU Manager version downloaded from the NVIDIA Software Portal.
263+
* ``VGPU_HOST_DRIVER_VERSION`` - The NVIDIA vGPU Manager version downloaded from the NVIDIA Software Portal.
267264
* ``OS_TAG`` - This must match the Guest OS version.
268265
For RedHat OpenShift, specify ``rhcos4.x`` where _x_ is the supported minor OCP version.
269266

270267
.. code-block:: console
271268
272-
$ export PRIVATE_REGISTRY=my/private/registry VERSION=510.73.06 OS_TAG=rhcos4.11
269+
$ export PRIVATE_REGISTRY=my/private/registry VGPU_HOST_DRIVER_VERSION=580.82.07 OS_TAG=rhcos4.18
273270
274271
.. note::
275272

@@ -280,15 +277,13 @@ Use the following steps to build the vGPU Manager container and push it to a pri
280277

281278
.. code-block:: console
282279
283-
$ docker build \
284-
--build-arg DRIVER_VERSION=${VERSION} \
285-
-t ${PRIVATE_REGISTRY}/vgpu-manager:${VERSION}-${OS_TAG} .
280+
$ VGPU_HOST_DRIVER_VERSION=${VGPU_HOST_DRIVER_VERSION} IMAGE_NAME=${PRIVATE_REGISTRY}/vgpu-manager make build-vgpuhost-${OS_TAG}
286281
287282
#. Push the NVIDIA vGPU Manager image to your private registry.
288283

289284
.. code-block:: console
290285
291-
$ docker push ${PRIVATE_REGISTRY}/vgpu-manager:${VERSION}-${OS_TAG}
286+
$ VGPU_HOST_DRIVER_VERSION=${VGPU_HOST_DRIVER_VERSION} IMAGE_NAME=${PRIVATE_REGISTRY}/vgpu-manager make push-vgpuhost-${OS_TAG}
292287
293288
.. _install-the-gpu-operator:
294289

@@ -425,7 +420,7 @@ As a cluster administrator, you can create a ClusterPolicy using the OpenShift C
425420
* Under *env*, fill in **image** with ``vgpu-manager`` and the **version** with your driver version.
426421
* Expand the **NVIDIA vGPU Device Manager config** section and make sure that the **enabled** checkbox is checked.
427422

428-
If you are only using GPU passthrough, you don't need to fill these sections out.
423+
If you are only using GPU passthrough, you do not need to fill these sections out.
429424

430425
* Expand the **VFIO Manager config** section and select the **enabled** checkbox.
431426
* Optionally, in the **Sandbox Workloads config** section, set **defaultWorkload** to ``vm-passthrough`` if you want passthrough to be the default mode.
@@ -687,7 +682,7 @@ Switching vGPU device configuration after one has been successfully applied assu
687682

688683
To apply a new configuration after GPU Operator install, simply update the ``nvidia.com/vgpu.config`` node label.
689684

690-
Let's run through an example on a system with two **A10** GPUs.
685+
The following example shows a system with two **A10** GPUs.
691686

692687
.. code-block:: console
693688
@@ -704,7 +699,7 @@ After installing the GPU Operator as detailed in the previous sections and witho
704699
"nvidia.com/NVIDIA_A10-12Q": "4"
705700
}
706701
707-
If instead you want to create **A10-4Q** devices, we can label the node like such:
702+
If instead you want to create **A10-4Q** devices, label the node as follows:
708703

709704
.. code-block:: console
710705

0 commit comments

Comments
 (0)