Skip to content

Conversation

@NRoshanRai
Copy link
Contributor

@NRoshanRai NRoshanRai commented Dec 19, 2025

What problem does this PR solve?:
steps to create a doca-ofed driver https://docs.google.com/document/d/1n8A1f3AWr1sZ1RK1Ggq65MkHk-eHgQAJ2W4E29yuCnM/edit?usp=sharing

this ci perform the above operation, this driver is needed for nvidia network operator

Which issue(s) does this PR fix?:

https://jira.nutanix.com/browse/NCN-111527

Does this PR introduce a user-facing change?:


Checklist

  • If the PR adds a version bump, ensure there is no breaking change in Licensing model (or NA).
  • If a chart is changed or app configuration is significantly changed, the chart version is correctly incremented (so that apps are not automatically upgraded from a previous version of DKP).

@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 19, 2025
@NRoshanRai
Copy link
Contributor Author

just publish-doca-ofed-driver ghcr.io/nutanix-cloud-native ubuntu22.04 x86_64 ubuntu:22.04 5.15.0-139-generic 3.2.0 25.10-1.2.8.0
  Downloading RHEL_Dockerfile...
doca-builder/RHEL_Dockerfile    100%[======================================================>]   4.56K  --.-KB/s    in 0s
  Downloading Ubuntu_Dockerfile...
doca-builder/Ubuntu_Dockerfile  100%[======================================================>]   4.83K  --.-KB/s    in 0s
  Downloading SLES_Dockerfile...
doca-builder/SLES_Dockerfile    100%[======================================================>]   5.64K  --.-KB/s    in 0.001s
  Downloading entrypoint.sh...
doca-builder/entrypoint.sh      100%[======================================================>]  57.92K  --.-KB/s    in 0.01s
  Downloading dtk_nic_driver_build.sh...
doca-builder/dtk_nic_driver_bui 100%[======================================================>]   2.29K  --.-KB/s    in 0s
Download complete. Setting executable permissions...
Building DOCA-OFED Docker image...
  Registry:      ghcr.io/nutanix-cloud-native
  Image tag:     doca3.2.0-25.10-1.2.8.0-0-5.15.0-139-generic-ubuntu22.04-x86_64
  Dockerfile:    Ubuntu_Dockerfile
  Linux distro:  ubuntu22.04
  Arch:          x86_64
  Base image:    ubuntu:22.04
  Kernel:        5.15.0-139-generic
  DOCA version:  3.2.0
  OFED version:  25.10-1.2.8.0

[+] Building 2.9s (26/26) FINISHED                                                                      docker:rancher-desktop
 => [internal] load build definition from Ubuntu_Dockerfile                                                               0.0s
 => => transferring dockerfile: 4.99kB                                                                                    0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                           1.9s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                             0.0s
 => [internal] load .dockerignore                                                                                         0.0s
 => => transferring context: 2B                                                                                           0.0s
 => [base 1/5] FROM docker.io/library/ubuntu:22.04@sha256:104ae83764a5119017b8e8d6218fa0832b09df65aae7d5a6de29a85d813da2  0.0s
 => [internal] load build context                                                                                         0.0s
 => => transferring context: 59.37kB                                                                                      0.0s
 => [driver-src 6/8] ADD https://linux.mellanox.com/public/repo/doca/3.2.0/SOURCES/mlnx_ofed/MLNX_OFED_SRC-debian-25.10-  0.9s
 => CACHED [base 2/5] WORKDIR /root                                                                                       0.0s
 => CACHED [base 3/5] RUN set -x &&     for source in ; do rm -f /etc/apt/sources.list.d/${source}.list; done &&     apt  0.0s
 => CACHED [base 4/5] ADD ./entrypoint.sh /root/entrypoint.sh                                                             0.0s
 => CACHED [precompiled 1/5] RUN set -x &&     apt-get install -y lsb-release &&     test -n "5.15.0-139-generic" && apt  0.0s
 => CACHED [precompiled 2/5] RUN set -x &&     apt-get clean autoclean &&     rm -rf /var/lib/apt/lists/*                 0.0s
 => CACHED [driver-src 1/8] WORKDIR /root                                                                                 0.0s
 => CACHED [driver-src 2/8] RUN set -x &&     echo ubuntu22.04 | grep "ubuntu20.04" || GCC_VER="-12" &&     DEBIAN_FRONT  0.0s
 => CACHED [driver-src 3/8] RUN echo ubuntu22.04 | grep "ubuntu20.04" || ln -fs gcc-12 /usr/bin/gcc  # 'build-essential'  0.0s
 => CACHED [driver-src 4/8] RUN mkdir -p /run/mellanox/src                                                                0.0s
 => CACHED [driver-src 5/8] WORKDIR /run/mellanox/src                                                                     0.0s  => CACHED [driver-src 6/8] ADD https://linux.mellanox.com/public/repo/doca/3.2.0/SOURCES/mlnx_ofed/MLNX_OFED_SRC-debian  0.0s
 => CACHED [driver-src 7/8] RUN if file MLNX_OFED_SRC-debian-25.10-1.2.8.0.tgz | grep compressed; then     tar -xzf MLNX  0.0s
 => CACHED [driver-src 8/8] WORKDIR /root                                                                                 0.0s
 => CACHED [driver-builder 1/2] RUN set -x &&     apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get -yq insta  0.0s  => CACHED [driver-builder 2/2] RUN set -x &&     /run/mellanox/src/MLNX_OFED_SRC-25.10-1.2.8.0/install.pl --without-dep  0.0s
 => CACHED [precompiled 3/5] COPY --from=driver-builder /run/mellanox/src/MLNX_OFED_SRC-25.10-1.2.8.0/DEBS/ubuntu22.04/*  0.0s
 => CACHED [precompiled 4/5] RUN apt-get install -y /root/*.deb                                                           0.0s
 => CACHED [precompiled 5/5] RUN touch /lib/modules/5.15.0-139-generic/modules.order /lib/modules/5.15.0-139-generic/mod  0.0s  => exporting to image                                                                                                    0.0s
 => => exporting layers                                                                                                   0.0s
 => => writing image sha256:3d654163c2dc19613de5b654a445a7347322eb0ee1e7f99fbe551ec17ee6eee5                              0.0s
 => => naming to docker.io/library/doca-driver:doca3.2.0-25.10-1.2.8.0-0-5.15.0-139-generic-ubuntu22.04-x86_64            0.0s Docker build completed successfully.
Built image: doca-driver:doca3.2.0-25.10-1.2.8.0-0-5.15.0-139-generic-ubuntu22.04-x86_64
Tagging driver image for registry...
Complete! Tagged: ghcr.io/nutanix-cloud-native/doca-driver:doca3.2.0-25.10-1.2.8.0-0-5.15.0-139-generic-ubuntu22.04-x86_64
Pusing driver image to registry...
The push refers to repository [ghcr.io/nutanix-cloud-native/doca-driver]
5c21a0bbad5f: Pushed
576c7224912d: Pushed
77ea4fc6690a: Pushed
6aac55b966ea: Pushed
641eee88b83f: Pushed
61ca0c92e297: Pushed
e925a0419026: Pushed                                                                                                           5f70bf18a086: Mounted from nroshanrai/doca-driver
b3f74c31dcae: Mounted from nroshanrai/doca-driver
doca3.2.0-25.10-1.2.8.0-0-5.15.0-139-generic-ubuntu22.04-x86_64: digest: sha256:785b195f73adccaed31b542ea070c80d2316130936966e0a643374445eb403bb size: 2210
Driver created and publishedl successfully


# Config
DOCA_BUILD_REPO := "Mellanox/doca-driver-build"
DOCA_BUILD_COMMIT := "661561f9969516748c35235e15bda27216807152"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can "latest" be used here? or this will have to be maintained incase of newer commits?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.nvidia.com/networking/display/kubernetes25100/advanced/doca-drivers.html#download-docker-files-and-scripts
in official doc also they have provided a commit hash , unfortunately the one they have provided have bug , so have picked a recent one where the script is working fine

they are not maintaining any release or tag , therefore for now the best we can do is stick to a commit which work for us

# Map Linux distribution to Dockerfile name
_dockerfile-for distro:
@case "{{ distro }}" in \
rhcos4.16) echo "RHEL_Dockerfile" ;; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think for now, ubuntu only is sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes , can remove the extra handling

@echo " Image tag: $(just _image-tag '{{ doca_version }}' '{{ ofed_version }}' '{{ kernel_version }}' '{{ linux_distro }}' '{{ arch }}')"
@echo " Dockerfile: $(just _dockerfile-for '{{ linux_distro }}')"
@echo " Linux distro: {{ linux_distro }}"
@echo " Arch: {{ arch }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can only be amd64 or arm64 right? I am thinking if we need this input or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coveralls
Copy link

coveralls commented Dec 19, 2025

Pull Request Test Coverage Report for Build 20454786376

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 33.945%

Totals Coverage Status
Change from base Build 20345119860: 0.0%
Covered Lines: 111
Relevant Lines: 327

💛 - Coveralls

@cwyl02
Copy link
Contributor

cwyl02 commented Dec 23, 2025

great work! let's move this to https://github.com/mesosphere/dkp-container-images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants