Repository: NVIDIA/hpc-container-maker

Issue:
Update default hpcx to v2.22.1
A few things have changed since in the URL format:

```
hpcx(version='2.22.1', oslabel='ubuntu24.04', ofedlabel='gcc-doca_ofed') 
```

Discussion:

Patch:
diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml
index b5fab08..bf34a84 100644
--- a/.github/workflows/docker_build.yml
+++ b/.github/workflows/docker_build.yml
@@ -79,12 +79,12 @@ jobs:
     - uses: actions/checkout@v2
 
     - name: Set up Python
-      uses: actions/setup-python@v1
+      uses: actions/setup-python@v5
 
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install six archspec
+        pip install six archspec packaging
 
     - name: Build container
       run: |
diff --git a/.github/workflows/singularity_build.yml b/.github/workflows/singularity_build.yml
index 07a133b..5783ff3 100644
--- a/.github/workflows/singularity_build.yml
+++ b/.github/workflows/singularity_build.yml
@@ -79,12 +79,12 @@ jobs:
     - uses: actions/checkout@v2
 
     - name: Set up Python
-      uses: actions/setup-python@v1
+      uses: actions/setup-python@v5
 
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install six archspec
+        pip install six archspec packaging
 
     - name: Install Singularity
       run: |
diff --git a/docs/building_blocks.md b/docs/building_blocks.md
index 0fd27ea..3b20581 100644
--- a/docs/building_blocks.md
+++ b/docs/building_blocks.md
@@ -840,12 +840,15 @@ default values are `make` and `wget`.
 - __prefix__: The top level install location.  The default value is
 `/usr/local/gdrcopy`.
 
+- __targets__: List of make targets to build.  The default values are
+`lib` and `lib_install`.
+
 - __toolchain__: The toolchain object.  This should be used if
 non-default compilers or other toolchain options are needed.  The
 default is empty.
 
 - __version__: The version of gdrcopy source to download.  The default
-value is `2.2`.
+value is `2.4.4`.
 
 __Examples__
 
@@ -1574,15 +1577,16 @@ library directories. This value is ignored if `hpcxinit` is
 `True`. The default value is False.
 
 - __mlnx_ofed__: The version of Mellanox OFED that should be matched.
-This value is ignored if Inbox OFED is selected.  The default
-value is `5` for HPC-X version 2.10 and later, and `5.2-2.2.0.0`
-for earlier HPC-X versions.
+This value is ignored if Inbox OFED is selected, or for HPC-X 2.21
+and later.  The default value is `5` for HPC-X version 2.10 and
+later, and `5.2-2.2.0.0` for earlier HPC-X versions.
 
 - __multi_thread__: Boolean flag to specify whether the multi-threaded
 version of Mellanox HPC-X should be used.  The default is `False`.
 
 - __ofedlabel__: The Mellanox OFED label assigned by Mellanox to the
-tarball.  For version 2.16 and later, the default value is
+tarball.  For version 2.21 and later, the default value is
+`gcc-doca_ofed`.  For version 2.16 through 2.18, the default value is
 `gcc-mlnx_ofed`.  For earlier versions, the default value is
 `gcc-MLNX_OFED_LINUX-5`.  This value is ignored if `inbox` is `True`.
 
@@ -1606,7 +1610,7 @@ distributions the default values are `bzip2`, `numactl-libs`,
 `/usr/local/hpcx`.
 
 - __version__: The version of Mellanox HPC-X to install.  The default
-value is `2.19`.
+value is `2.22.1`.
 
 __Examples__
 
diff --git a/hpccm/building_blocks/gdrcopy.py b/hpccm/building_blocks/gdrcopy.py
index 538a664..af45824 100644
--- a/hpccm/building_blocks/gdrcopy.py
+++ b/hpccm/building_blocks/gdrcopy.py
@@ -59,12 +59,15 @@ class gdrcopy(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig):
     prefix: The top level install location.  The default value is
     `/usr/local/gdrcopy`.
 
+    targets: List of make targets to build.  The default values are
+    `lib` and `lib_install`.
+
     toolchain: The toolchain object.  This should be used if
     non-default compilers or other toolchain options are needed.  The
     default is empty.
 
     version: The version of gdrcopy source to download.  The default
-    value is `2.2`.
+    value is `2.4.4`.
 
     # Examples
 
@@ -83,8 +86,9 @@ class gdrcopy(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig):
         self.__baseurl = kwargs.pop('baseurl', 'https://github.com/NVIDIA/gdrcopy/archive')
         self.__ospackages = kwargs.pop('ospackages', ['make', 'wget'])
         self.__prefix = kwargs.pop('prefix', '/usr/local/gdrcopy')
+        self.__targets = kwargs.pop('targets', ['lib', 'lib_install'])
         self.__toolchain = kwargs.pop('toolchain', toolchain())
-        self.__version = kwargs.pop('version', '2.2')
+        self.__version = kwargs.pop('version', '2.4.4')
 
 
         # Since gdrcopy does not use autotools or CMake, the toolchain
@@ -122,7 +126,7 @@ class gdrcopy(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig):
             base_annotation=self.__class__.__name__,
             # Work around "install -D" issue on CentOS
             build=['mkdir -p {0}/include {0}/{1}'.format(self.__prefix, libdir),
-                   'make {} lib lib_install'.format(make_opts_str)],
+                   'make {0} {1}'.format(make_opts_str, ' '.join(self.__targets))],
             comment=False,
             devel_environment=self.environment_variables,
             directory='gdrcopy-{}'.format(self.__version),
diff --git a/hpccm/building_blocks/hpcx.py b/hpccm/building_blocks/hpcx.py
index 7d99f32..9263cc8 100644
--- a/hpccm/building_blocks/hpcx.py
+++ b/hpccm/building_blocks/hpcx.py
@@ -86,15 +86,16 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
     `True`. The default value is False.
 
     mlnx_ofed: The version of Mellanox OFED that should be matched.
-    This value is ignored if Inbox OFED is selected.  The default
-    value is `5` for HPC-X version 2.10 and later, and `5.2-2.2.0.0`
-    for earlier HPC-X versions.
+    This value is ignored if Inbox OFED is selected, or for HPC-X 2.21
+    and later.  The default value is `5` for HPC-X version 2.10 and
+    later, and `5.2-2.2.0.0` for earlier HPC-X versions.
 
     multi_thread: Boolean flag to specify whether the multi-threaded
     version of Mellanox HPC-X should be used.  The default is `False`.
 
     ofedlabel: The Mellanox OFED label assigned by Mellanox to the
-    tarball.  For version 2.16 and later, the default value is
+    tarball.  For version 2.21 and later, the default value is
+    `gcc-doca_ofed`.  For version 2.16 through 2.18, the default value is
     `gcc-mlnx_ofed`.  For earlier versions, the default value is
     `gcc-MLNX_OFED_LINUX-5`.  This value is ignored if `inbox` is `True`.
 
@@ -118,7 +119,7 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
     `/usr/local/hpcx`.
 
     version: The version of Mellanox HPC-X to install.  The default
-    value is `2.19`.
+    value is `2.22.1`.
 
     # Examples
 
@@ -147,7 +148,7 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
         self.__ospackages = kwargs.get('ospackages', []) # Filled in by _distro()
         self.__packages = kwargs.get('packages', [])
         self.__prefix = kwargs.get('prefix', '/usr/local/hpcx')
-        self.__version = kwargs.get('version', '2.19')
+        self.__version = kwargs.get('version', '2.22.1')
 
         self.__commands = [] # Filled in by __setup()
         self.__wd = kwargs.get('wd', hpccm.config.g_wd) # working directory
@@ -173,7 +174,9 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
                 self.__mlnx_ofed = '5.2-2.2.0.0'
 
         if not self.__ofedlabel:
-            if Version(self.__version) >= Version('2.16'):
+            if Version(self.__version) >= Version('2.21'):
+                self.__ofedlabel = 'gcc-doca_ofed'
+            elif Version(self.__version) >= Version('2.16'):
                 self.__ofedlabel = 'gcc-mlnx_ofed'
             else:
                 self.__ofedlabel = 'gcc-MLNX_OFED_LINUX-{}'.format(self.__mlnx_ofed)
@@ -205,7 +208,9 @@ class hpcx(bb_base, hpccm.templates.envvars, hpccm.templates.ldconfig,
 
         if hpccm.config.g_linux_distro == linux_distro.UBUNTU:
             if not self.__oslabel:
-                if hpccm.config.g_linux_version >= Version('22.0'):
+                if hpccm.config.g_linux_version >= Version('24.0'):
+                    self.__oslabel = 'ubuntu24.04'
+                elif hpccm.config.g_linux_version >= Version('22.0'):
                     self.__oslabel = 'ubuntu22.04'
                 elif hpccm.config.g_linux_version >= Version('20.0'):
                     self.__oslabel = 'ubuntu20.04'


Test patch:
diff --git a/test/test_gdrcopy.py b/test/test_gdrcopy.py
index 7612bc7..1e424a5 100644
--- a/test/test_gdrcopy.py
+++ b/test/test_gdrcopy.py
@@ -38,18 +38,18 @@ class Test_gdrcopy(unittest.TestCase):
         """Default gdrcopy building block"""
         g = gdrcopy()
         self.assertEqual(str(g),
-r'''# GDRCOPY version 2.2
+r'''# GDRCOPY version 2.4.4
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         make \
         wget && \
     rm -rf /var/lib/apt/lists/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.2.tar.gz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.2.tar.gz -C /var/tmp -z && \
-    cd /var/tmp/gdrcopy-2.2 && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.4.4.tar.gz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.4.4.tar.gz -C /var/tmp -z && \
+    cd /var/tmp/gdrcopy-2.4.4 && \
     mkdir -p /usr/local/gdrcopy/include /usr/local/gdrcopy/lib && \
     make prefix=/usr/local/gdrcopy lib lib_install && \
-    rm -rf /var/tmp/gdrcopy-2.2 /var/tmp/v2.2.tar.gz
+    rm -rf /var/tmp/gdrcopy-2.4.4 /var/tmp/v2.4.4.tar.gz
 ENV CPATH=/usr/local/gdrcopy/include:$CPATH \
     LD_LIBRARY_PATH=/usr/local/gdrcopy/lib:$LD_LIBRARY_PATH \
     LIBRARY_PATH=/usr/local/gdrcopy/lib:$LIBRARY_PATH''')
@@ -60,17 +60,17 @@ ENV CPATH=/usr/local/gdrcopy/include:$CPATH \
         """Default gdrcopy building block"""
         g = gdrcopy()
         self.assertEqual(str(g),
-r'''# GDRCOPY version 2.2
+r'''# GDRCOPY version 2.4.4
 RUN yum install -y \
         make \
         wget && \
     rm -rf /var/cache/yum/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.2.tar.gz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.2.tar.gz -C /var/tmp -z && \
-    cd /var/tmp/gdrcopy-2.2 && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.4.4.tar.gz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.4.4.tar.gz -C /var/tmp -z && \
+    cd /var/tmp/gdrcopy-2.4.4 && \
     mkdir -p /usr/local/gdrcopy/include /usr/local/gdrcopy/lib && \
     make prefix=/usr/local/gdrcopy lib lib_install && \
-    rm -rf /var/tmp/gdrcopy-2.2 /var/tmp/v2.2.tar.gz
+    rm -rf /var/tmp/gdrcopy-2.4.4 /var/tmp/v2.4.4.tar.gz
 ENV CPATH=/usr/local/gdrcopy/include:$CPATH \
     LD_LIBRARY_PATH=/usr/local/gdrcopy/lib:$LD_LIBRARY_PATH \
     LIBRARY_PATH=/usr/local/gdrcopy/lib:$LIBRARY_PATH''')        
@@ -170,18 +170,18 @@ ENV CPATH=/usr/local/gdrcopy/include:$CPATH \
         tc = toolchain(CC='gcc', CFLAGS='-O2')
         g = gdrcopy(toolchain=tc)
         self.assertEqual(str(g),
-r'''# GDRCOPY version 2.2
+r'''# GDRCOPY version 2.4.4
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         make \
         wget && \
     rm -rf /var/lib/apt/lists/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.2.tar.gz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.2.tar.gz -C /var/tmp -z && \
-    cd /var/tmp/gdrcopy-2.2 && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/NVIDIA/gdrcopy/archive/v2.4.4.tar.gz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/v2.4.4.tar.gz -C /var/tmp -z && \
+    cd /var/tmp/gdrcopy-2.4.4 && \
     mkdir -p /usr/local/gdrcopy/include /usr/local/gdrcopy/lib && \
     make CC=gcc COMMONCFLAGS=-O2 prefix=/usr/local/gdrcopy lib lib_install && \
-    rm -rf /var/tmp/gdrcopy-2.2 /var/tmp/v2.2.tar.gz
+    rm -rf /var/tmp/gdrcopy-2.4.4 /var/tmp/v2.4.4.tar.gz
 ENV CPATH=/usr/local/gdrcopy/include:$CPATH \
     LD_LIBRARY_PATH=/usr/local/gdrcopy/lib:$LD_LIBRARY_PATH \
     LIBRARY_PATH=/usr/local/gdrcopy/lib:$LIBRARY_PATH''')    
diff --git a/test/test_hpcx.py b/test/test_hpcx.py
index 74a6cca..c49b742 100644
--- a/test/test_hpcx.py
+++ b/test/test_hpcx.py
@@ -22,11 +22,11 @@ from __future__ import print_function
 import logging # pylint: disable=unused-import
 import unittest
 
-from helpers import aarch64, centos, centos8, docker, ppc64le, ubuntu, ubuntu18, ubuntu20, ubuntu22, x86_64
+from helpers import aarch64, centos, centos8, docker, ppc64le, ubuntu, ubuntu18, ubuntu20, ubuntu22, ubuntu24, x86_64
 
 from hpccm.building_blocks.hpcx import hpcx
 
-class Test_mlnx_ofed(unittest.TestCase):
+class Test_hpcx(unittest.TestCase):
     def setUp(self):
         """Disable logging output messages"""
         logging.disable(logging.ERROR)
@@ -38,7 +38,30 @@ class Test_mlnx_ofed(unittest.TestCase):
         """Default hpcx building block"""
         h = hpcx()
         self.assertEqual(str(h),
-r'''# Mellanox HPC-X version 2.19
+r'''# Mellanox HPC-X version 2.22.1
+RUN apt-get update -y && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+        bzip2 \
+        libnuma1 \
+        openssh-client \
+        tar \
+        wget && \
+    rm -rf /var/lib/apt/lists/*
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.22.1/hpcx-v2.22.1-gcc-doca_ofed-ubuntu20.04-cuda12-x86_64.tbz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu20.04-cuda12-x86_64.tbz -C /var/tmp -j && \
+    cp -a /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu20.04-cuda12-x86_64 /usr/local/hpcx && \
+    echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
+    echo "hpcx_load" >> /etc/bash.bashrc && \
+    rm -rf /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu20.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu20.04-cuda12-x86_64''')
+
+    @x86_64
+    @ubuntu24
+    @docker
+    def test_defaults_ubuntu24(self):
+        """Default hpcx building block"""
+        h = hpcx()
+        self.assertEqual(str(h),
+r'''# Mellanox HPC-X version 2.22.1
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         bzip2 \
@@ -47,19 +70,19 @@ RUN apt-get update -y && \
         tar \
         wget && \
     rm -rf /var/lib/apt/lists/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz -C /var/tmp -j && \
-    cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64 /usr/local/hpcx && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.22.1/hpcx-v2.22.1-gcc-doca_ofed-ubuntu24.04-cuda12-x86_64.tbz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu24.04-cuda12-x86_64.tbz -C /var/tmp -j && \
+    cp -a /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu24.04-cuda12-x86_64 /usr/local/hpcx && \
     echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
     echo "hpcx_load" >> /etc/bash.bashrc && \
-    rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu20.04-cuda12-x86_64''')
+    rm -rf /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu24.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu24.04-cuda12-x86_64''')
 
     @x86_64
     @centos
     @docker
     def test_defaults_centos7(self):
-        """Default mlnx_ofed building block"""
-        h = hpcx()
+        """Default hpcx building block"""
+        h = hpcx(version='2.19')
         self.assertEqual(str(h),
 r'''# Mellanox HPC-X version 2.19
 RUN yum install -y \
@@ -80,10 +103,10 @@ RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://
     @centos8
     @docker
     def test_defaults_centos8(self):
-        """Default mlnx_ofed building block"""
+        """Default hpcx building block"""
         h = hpcx()
         self.assertEqual(str(h),
-r'''# Mellanox HPC-X version 2.19
+r'''# Mellanox HPC-X version 2.22.1
 RUN yum install -y \
         bzip2 \
         numactl-libs \
@@ -91,12 +114,12 @@ RUN yum install -y \
         tar \
         wget && \
     rm -rf /var/cache/yum/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz -C /var/tmp -j && \
-    cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64 /usr/local/hpcx && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.22.1/hpcx-v2.22.1-gcc-doca_ofed-redhat8-cuda12-x86_64.tbz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-redhat8-cuda12-x86_64.tbz -C /var/tmp -j && \
+    cp -a /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-redhat8-cuda12-x86_64 /usr/local/hpcx && \
     echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bashrc && \
     echo "hpcx_load" >> /etc/bashrc && \
-    rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-redhat8-cuda12-x86_64''')
+    rm -rf /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-redhat8-cuda12-x86_64.tbz /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-redhat8-cuda12-x86_64''')
 
     @x86_64
     @ubuntu
@@ -291,7 +314,7 @@ RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://
         h = hpcx()
         r = h.runtime()
         self.assertEqual(r,
-r'''# Mellanox HPC-X version 2.19
+r'''# Mellanox HPC-X version 2.22.1
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         bzip2 \
@@ -300,9 +323,9 @@ RUN apt-get update -y && \
         tar \
         wget && \
     rm -rf /var/lib/apt/lists/*
-RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.19/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz -C /var/tmp -j && \
-    cp -a /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64 /usr/local/hpcx && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://content.mellanox.com/hpc/hpc-x/v2.22.1/hpcx-v2.22.1-gcc-doca_ofed-ubuntu22.04-cuda12-x86_64.tbz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu22.04-cuda12-x86_64.tbz -C /var/tmp -j && \
+    cp -a /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu22.04-cuda12-x86_64 /usr/local/hpcx && \
     echo "source /usr/local/hpcx/hpcx-init-ompi.sh" >> /etc/bash.bashrc && \
     echo "hpcx_load" >> /etc/bash.bashrc && \
-    rm -rf /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.19-gcc-mlnx_ofed-ubuntu22.04-cuda12-x86_64''')
+    rm -rf /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu22.04-cuda12-x86_64.tbz /var/tmp/hpcx-v2.22.1-gcc-doca_ofed-ubuntu22.04-cuda12-x86_64''')