You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you begin, ensure that you have the following prerequisites:
317
+
318
+
~~~~~~
319
+
Common
320
+
~~~~~~
321
+
322
+
- Docker (Ubuntu) / Podman (RH) installed on your build system.
323
+
- Web access to NVIDIA NIC drivers sources. Latest NIC drivers published at `NIC drivers download center <https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/>`_, for example: `https://www.mellanox.com/downloads/ofed/MLNX_OFED-24.04-0.6.6.0/MLNX_OFED_SRC-debian-24.04-0.6.6.0-0.tgz <https://www.mellanox.com/downloads/ofed/MLNX_OFED-24.04-0.6.6.0/MLNX_OFED_SRC-debian-24.04-0.6.6.0-0.tgz>`_
324
+
325
+
326
+
~~~~
327
+
RHEL
328
+
~~~~
329
+
330
+
- Active subscription and login credentials for `registry.redhat.io <https://registry.redhat.io>`_. To build RHEL based container from official repository, you need to log in to `registry.redhat.io <https://registry.redhat.io>`_, run the following command:
Replace `RH_USERNAME` and `RH_PASSWORD` with your Red Hat account username and password.
337
+
338
+
-------------------
339
+
Dockerfile Overview
340
+
-------------------
341
+
342
+
To build the precompiled container, the Dockerfile is constructed in a multistage fashion.
343
+
This approach is used to optimize the resulting container image size and reduce the number of dependencies included in the final image.
344
+
345
+
The Dockerfile consists of the following stages:
346
+
347
+
1. **Base Image Update**: The base image is updated and common requirements are installed. This stage sets up the basic environment for the subsequent stages.
348
+
349
+
2. **Download Driver Sources**: This stage downloads the Mellanox OFED driver sources to the specified path. It prepares the necessary files for the driver build process.
350
+
351
+
3. **Build Driver**: The driver is built using the downloaded sources and installed on the container. This stage ensures that the driver is compiled and configured correctly for the target system.
352
+
353
+
4. **Install precompiled driver**: Finally, the precompiled driver is installed on clean container. This stage sets up the environment to run the NVIDIA NIC drivers on the target system.
354
+
355
+
356
+
---------------------------------
357
+
Common mandatory build parameters
358
+
---------------------------------
359
+
360
+
Before building the container, you need to provide following parameters as `build-arg` for container build:
361
+
362
+
1. `D_OS`: The Linux distribution (e.g., ubuntu22.04 / rhel9.2)
363
+
2. `D_ARCH`: Compiled Architecture
364
+
3. `D_BASE_IMAGE`: Base container image
365
+
4. `D_KERNEL_VER`: The target kernel version (e.g., 5.15.0-25-generic / 5.14.0-284.32.1.el9_2.x86_64)
366
+
5. `D_OFED_VERSION`: NVIDIA NIC drivers version (e.g., 24.01-0.3.3.1)
367
+
368
+
**NOTE:** Check desired NVIDIA NIC drivers sources[^1] availability for designated container OS, only versions available on download page can be utilized
369
+
370
+
------------------------------
371
+
RHEL-specific build parameters
372
+
------------------------------
373
+
374
+
1. `D_BASE_IMAGE`: DriverToolKit container image
375
+
376
+
**NOTE:** DTK (DriverToolKit) is tightly coupled with specific kernel versions, verify match between kernel version to compile drivers for, versus DTK image.
377
+
378
+
2. `D_FINAL_BASE_IMAGE`: Final container image, to install compiled driver
379
+
380
+
For more details regarding DTK please read `official documentation <https://docs.openshift.com/container-platform/4.15/hardware_enablement/psap-driver-toolkit.html#pulling-the-driver-toolkit-from-payload>`_.
381
+
382
+
**NOTE:** For proper Network Operator functionality container tag name must be in following pattern: **driver_ver-container_ver-kernel_ver-os-arch**. For example: 24.01-0.3.3.1-0-5.15.0-25-generic-ubuntu22.04-amd64
383
+
384
+
~~~~~~~~~~~~
385
+
RHEL example
386
+
~~~~~~~~~~~~
387
+
388
+
To build RHEL-based image please use provided :download:`Dockerfile <files/RHEL_Dockerfile>`:
0 commit comments