Skip to content

Commit

Permalink
chore: update doca-driver precompiled
Browse files Browse the repository at this point in the history
Add DOCA version param

Signed-off-by: Fred Rolland <[email protected]>
  • Loading branch information
rollandf committed Dec 18, 2024
1 parent c826633 commit 1b4e11f
Showing 1 changed file with 50 additions and 17 deletions.
67 changes: 50 additions & 17 deletions docs/advanced-configurations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,10 @@ Before you begin, ensure that you have the following prerequisites:
Common
~~~~~~
- Docker (Ubuntu) / Podman (RH) installed on your build system.
- 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>`_
- Web access to NVIDIA NIC drivers sources. Latest NIC drivers are published at `NVIDIA DOCA Downloads <https://developer.nvidia.com/doca-downloads>`_, for example: `https://linux.mellanox.com/public/repo/doca/2.9.1/SOURCES/MLNX_OFED/MLNX_OFED_SRC-debian-24.10-1.1.4.0.tgz <https://linux.mellanox.com/public/repo/doca/2.9.1/SOURCES/MLNX_OFED/MLNX_OFED_SRC-debian-24.10-1.1.4.0.tgz>`_

**NOTE:** NVIDIA NIC driver sources are bundled as part of NVIDIA DOCA package. Both the DOCA package version and its corresponding NIC driver (MLNX_OFED) version need to be specified to fetch the correct driver sources when building the driver container.
For example, given a DOCA package version (e.g `2.9.1`) you can find the corresponding MLNX_OFED version at the link: `<https://linux.mellanox.com/public/repo/doca/2.9.1/SOURCES/MLNX_OFED/>`_ which is `24.10-1.1.4.0`

~~~~
RHEL
Expand All @@ -342,6 +344,11 @@ RHCOS
- Install `oc <https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html>`_ CLI tool.
- Download OpenShift `pull secret <https://console.redhat.com/openshift/install/pull-secret>`_.

~~~~~
SLES:
~~~~~
Active subscription.

-------------------
Dockerfile Overview
-------------------
Expand All @@ -368,13 +375,14 @@ Before building the container, you need to provide following parameters as `buil

1. `D_OS`: The Linux distribution (e.g., ubuntu22.04 / rhel9.2)
2. `D_ARCH`: Compiled Architecture
3. `D_BASE_IMAGE`: Base container image
3. `D_BASE_IMAGE`: Base container image (e.g., ubuntu:22.04)
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)
5. `D_OFED_VERSION`: NVIDIA NIC drivers version (e.g., 24.01-0.3.3.1)
5. `D_DOCA_VERSION`: NVIDIA DOCA version (e.g., 2.9.1)
6. `D_OFED_VERSION`: NVIDIA NIC drivers version (e.g., 24.10-1.1.4.0)

**NOTE:** Check desired NVIDIA NIC drivers sources[^1] availability for designated container OS, only versions available on download page can be utilized
**NOTE:** Check desired NVIDIA NIC drivers sources availability for designated container OS, only versions available on download page can be utilized

**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
**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.10-1.1.4.0-0-5.15.0-25-generic-ubuntu22.04-amd64

------------------------------
RHEL specific build parameters
Expand Down Expand Up @@ -420,63 +428,88 @@ Then pull the DTK image locally using your pull-secret:
RHEL example
~~~~~~~~~~~~

To build RHEL-based image please use provided `RHEL Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/336aa1f143601cd2eb1fba646827b39bb5c86515/RHEL_Dockerfile>`_:
To build RHEL-based image please use provided `RHEL Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/RHEL_Dockerfile>`_:

.. code-block:: bash
podman build \
--build-arg D_OS=rhel9.2 \
--build-arg D_ARCH=x86_64 \
--build-arg D_KERNEL_VER=5.14.0-284.32.1.el9_2.x86_64 \
--build-arg D_OFED_VERSION=24.01-0.3.3.1 \
--build-arg D_DOCA_VERSION=2.9.1 \
--build-arg D_OFED_VERSION=24.10-1.1.4.0 \
--build-arg D_BASE_IMAGE="registry.redhat.io/openshift4/driver-toolkit-rhel9:v4.13.0-202309112001.p0.gd719bdc.assembly.stream" \
--build-arg D_FINAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:latest \
--tag 24.04-0.6.6.0-0-5.14.0-284.32.1.el9_2-rhel9.2-amd64 \
--tag 24.10-1.1.4.0-0-5.14.0-284.32.1.el9_2-rhel9.2-amd64 \
-f RHEL_Dockerfile \
--target precompiled .
~~~~~~~~~~~~~
RHCOS example
~~~~~~~~~~~~~

To build RHCOS based image please use provided `RHCOS Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/336aa1f143601cd2eb1fba646827b39bb5c86515/RHEL_Dockerfile>`_:
To build RHCOS based image please use provided `RHCOS Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/RHEL_Dockerfile>`_:

.. code-block:: bash
podman build \
--build-arg D_OS=rhcos4.16 \
--build-arg D_ARCH=x86_64 \
--build-arg D_KERNEL_VER=5.14.0-427.22.1.el9_4.x86_64 \
--build-arg D_OFED_VERSION=24.01-0.3.3.1 \
--build-arg D_DOCA_VERSION=2.9.1 \
--build-arg D_OFED_VERSION=24.10-1.1.4.0 \
--build-arg D_BASE_IMAGE="quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:dde3cd6a75d865a476aa7e1cab6fa8d97742401e87e0d514f3042c3a881e301f" \
--build-arg D_FINAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:9.4 \
--tag 24.01-0.3.3.1-0-5.14.0-427.22.1.el9_4.x86_64-rhcos4.16-amd64 \
--tag 24.10-1.1.4.0-0-5.14.0-427.22.1.el9_4.x86_64-rhcos4.16-amd64 \
-f RHEL_Dockerfile \
--target precompiled .
~~~~~~~~~~~~~~
Ubuntu example
~~~~~~~~~~~~~~

To build Ubuntu-based image please use provided `Ubuntu Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/336aa1f143601cd2eb1fba646827b39bb5c86515/Ubuntu_Dockerfile>`_:.
To build Ubuntu-based image please use provided `Ubuntu Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/Ubuntu_Dockerfile>`_:.

.. code-block:: bash
docker build \
--build-arg D_OS=ubuntu22.04 \
--build-arg D_ARCH=x86_64 \
--build-arg D_BASE_IMAGE=ubuntu:24.04 \
--build-arg D_BASE_IMAGE=ubuntu:22.04 \
--build-arg D_KERNEL_VER=5.15.0-25-generic \
--build-arg D_OFED_VERSION=24.01-0.3.3.1 \
--tag 24.01-0.3.3.1-0-5.15.0-25-generic-ubuntu22.04-amd64 \
--build-arg D_DOCA_VERSION=2.9.1 \
--build-arg D_OFED_VERSION=24.10-1.1.4.0 \
--tag 24.10-1.1.4.0-0-5.15.0-25-generic-ubuntu22.04-amd64 \
-f Ubuntu_Dockerfile \
--target precompiled .
~~~~~~~~~~~~
SLES example
~~~~~~~~~~~~

To build SLES-based image please use provided `SLES Dockerfile <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/SLES_Dockerfile>`_:.

**SLES example**:

.. code-block:: bash
docker build \
--build-arg D_OS=sles15.5 \
--build-arg D_ARCH=x86_64 \
--build-arg D_BASE_IMAGE=registry.suse.com/suse/sle15:15.5 \
--build-arg D_KERNEL_VER=5.14.21-150500.55.83-default \
--build-arg D_DOCA_VERSION=2.9.1 \
--build-arg D_OFED_VERSION=24.10-1.1.4.0 \
--tag 24.10-1.1.4.0-0-5.14.21-150500.55.83-default-sles15.5-amd64 \
-f SLES_Dockerfile \
--target precompiled .
**NOTE:** Dockerfiles contain default build parameters, which may fail build proccess on your system if not overridden.

**NOTE:** Download `entrypoint script file <https://raw.githubusercontent.com/Mellanox/doca-driver-build/336aa1f143601cd2eb1fba646827b39bb5c86515/entrypoint.sh>`_
**NOTE:** Download `entrypoint script file <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/entrypoint.sh>`_

**NOTE:** Download `DTK build script file <https://raw.githubusercontent.com/Mellanox/doca-driver-build/336aa1f143601cd2eb1fba646827b39bb5c86515/dtk_nic_driver_build.sh>`_
**NOTE:** Download `DTK build script file <https://raw.githubusercontent.com/Mellanox/doca-driver-build/249ff2118e4ae849d3c138ca6cbc5942f6101007/dtk_nic_driver_build.sh>`_

**NOTE:** Make sure the `.sh` files are executable by running `chmod +x entrypoint.sh dtk_nic_driver_build.sh`

Expand Down

0 comments on commit 1b4e11f

Please sign in to comment.