From d510e7e1b9f636e8e3aca02956714e822cbc4a35 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Sat, 28 Feb 2026 08:10:29 +0100 Subject: [PATCH 1/5] eb_hooks modifications for {2025.06}[2024a] TensorFlow v2.18.1 --- .../2025.06/eessi-2025.06-eb-5.2.0-2024a.yml | 17 ++++++++ eb_hooks.py | 42 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.2.0-2024a.yml diff --git a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.2.0-2024a.yml b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.2.0-2024a.yml new file mode 100644 index 00000000..53757510 --- /dev/null +++ b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.2.0-2024a.yml @@ -0,0 +1,17 @@ +easyconfigs: + - MLflow-2.22.4-gfbf-2024a.eb: + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/24951 + from-commit: 0f50e961c55d6406b0e64eebd59335b32dce0e92 + - Flux-0.80.0-GCC-13.3.0.eb + - WRF-4.6.1-foss-2024a-dmpar.eb + - buildenv-default-foss-2024a.eb + - GDRCopy-2.4.1-GCCcore-13.3.0.eb + - lit-18.1.7-GCCcore-13.3.0.eb + - pydot-3.0.3-GCCcore-13.3.0.eb + - pyzstd-0.16.2-GCCcore-13.3.0.eb: + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/23923 + from-commit: 0eef0cf4f6e03172451c41a5af1c0e26b7a777f8 + - GDB-16.3-GCCcore-13.3.0.eb + - TensorFlow-2.18.1-foss-2024a.eb diff --git a/eb_hooks.py b/eb_hooks.py index a295f6aa..7530bbf3 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -650,6 +650,47 @@ def parse_hook_maturin(ec, eprefix): raise EasyBuildError("maturin-specific hook triggered for non-maturin easyconfig?!") +def parse_hook_tensorflow_h5py_glibc(ec, eprefix): + """ + Fix the Python and environment used while building and running tests for TensorFlow with CUDA + """ + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') + if ec.name == 'TensorFlow' and ec.version == '2.18.1': + ec['preconfigopts'] = ec.get('preconfigopts', '') + ( + 'export GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc && ' + 'sed -i \'s|--define=PREFIX=/usr|--define=PREFIX=\\$EESSI_EPREFIX|g\' .bazelrc && ' + 'cat > /tmp/fix_h5py.py << \'EOF\'\n' + 'with open("requirements_lock_3_12.txt", "r") as f:\n' + ' content = f.read()\n' + 'content = content.replace("h5py==3.11.0 \\\\", "h5py==3.15.1 \\\\")\n' + 'content = content.replace(\n' + ' " --hash=sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0",\n' + ' " --hash=sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0 \\\\\\n --hash=sha256:8a33bfd5dfcea037196f7778534b1ff7e36a7f40a89e648c8f2967292eb6898e"\n' + ')\n' + 'with open("requirements_lock_3_12.txt", "w") as f:\n' + ' f.write(content)\n' + 'EOF\n' + 'python3 /tmp/fix_h5py.py && ' + ) + current_opts = ec.get('buildopts', []) + if isinstance(current_opts, str): + current_opts = current_opts.split() + + ec['buildopts'] = current_opts + [ + '--linkopt=-Wl,--disable-new-dtags --host_linkopt=-Wl,--disable-new-dtags --action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --host_action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --linkopt=-Wl,-rpath,$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib --host_linkopt=-Wl,-rpath,$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib ', + ] + + ec['pretestopts'] = ( + """interppath=$(find "$EESSI_EPREFIX/lib64" -name 'ld-*' | grep -E 'so\\.1|so\\.2' | head -n1) && """ + """pybin=$(find "%(builddir)s/%(name)s/bazel-root/" -type f -path "*/external/python_%(arch)s-unknown-linux-gnu/bin/python%(pyshortver)s" | head -n1) && """ + """patchelf --set-interpreter "$interppath" "$pybin" && """ + """export LD_LIBRARY_PATH="$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib:$LD_LIBRARY_PATH" && """ + ) + print_msg("TensorFlow-glibc related changes have been applied") + else: + raise EasyBuildError("TensorFlow-glibc specific hook triggered for non-TensorFlow-glibc easyconfig?!") + + def parse_hook_ucx_eprefix(ec, eprefix): """Make UCX aware of compatibility layer via additional configuration options.""" if ec.name == 'UCX': @@ -1856,6 +1897,7 @@ def post_easyblock_hook(self, *args, **kwargs): 'Mesa': parse_hook_mesa_use_llvm_minimal, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'pybind11': parse_hook_pybind11_replace_catch2, + 'TensorFlow': parse_hook_tensorflow_h5py_glibc, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, 'UCX': parse_hook_ucx_eprefix, } From 6451f30a17c0d8ee1c243fe59af5943fa806f429 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Sat, 28 Feb 2026 08:18:38 +0100 Subject: [PATCH 2/5] removed CUDA entries --- eb_hooks.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 7530bbf3..6f9c70f2 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -652,7 +652,7 @@ def parse_hook_maturin(ec, eprefix): def parse_hook_tensorflow_h5py_glibc(ec, eprefix): """ - Fix the Python and environment used while building and running tests for TensorFlow with CUDA + Fix the Python and environment used while building and running tests for TensorFlow-2.18.1 """ cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if ec.name == 'TensorFlow' and ec.version == '2.18.1': @@ -677,18 +677,17 @@ def parse_hook_tensorflow_h5py_glibc(ec, eprefix): current_opts = current_opts.split() ec['buildopts'] = current_opts + [ - '--linkopt=-Wl,--disable-new-dtags --host_linkopt=-Wl,--disable-new-dtags --action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --host_action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --linkopt=-Wl,-rpath,$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib --host_linkopt=-Wl,-rpath,$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib ', + '--linkopt=-Wl,--disable-new-dtags --host_linkopt=-Wl,--disable-new-dtags --action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --host_action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc ', ] ec['pretestopts'] = ( """interppath=$(find "$EESSI_EPREFIX/lib64" -name 'ld-*' | grep -E 'so\\.1|so\\.2' | head -n1) && """ """pybin=$(find "%(builddir)s/%(name)s/bazel-root/" -type f -path "*/external/python_%(arch)s-unknown-linux-gnu/bin/python%(pyshortver)s" | head -n1) && """ """patchelf --set-interpreter "$interppath" "$pybin" && """ - """export LD_LIBRARY_PATH="$EBROOTCUDA/lib:$EBROOTCUDNN/lib:$EBROOTNCCL/lib:$LD_LIBRARY_PATH" && """ ) - print_msg("TensorFlow-glibc related changes have been applied") + print_msg("TensorFlow-h5py-glibc related changes have been applied") else: - raise EasyBuildError("TensorFlow-glibc specific hook triggered for non-TensorFlow-glibc easyconfig?!") + raise EasyBuildError("TensorFlow-h5py-glibc specific hook triggered for non-TensorFlow easyconfig?!") def parse_hook_ucx_eprefix(ec, eprefix): From 79446cbb4c8029c04e3608e633c84f19cfe01461 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Sat, 28 Feb 2026 08:20:47 +0100 Subject: [PATCH 3/5] removed unnecessary changes --- eb_hooks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 6f9c70f2..b4a076e5 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -654,7 +654,6 @@ def parse_hook_tensorflow_h5py_glibc(ec, eprefix): """ Fix the Python and environment used while building and running tests for TensorFlow-2.18.1 """ - cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if ec.name == 'TensorFlow' and ec.version == '2.18.1': ec['preconfigopts'] = ec.get('preconfigopts', '') + ( 'export GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc && ' From b99c09e0d2666425e0fa0aabf54ce5fc78f78b5e Mon Sep 17 00:00:00 2001 From: Richard Top Date: Sat, 28 Feb 2026 10:17:31 +0100 Subject: [PATCH 4/5] fixed typo --- eb_hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index b4a076e5..bf244e12 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -676,7 +676,7 @@ def parse_hook_tensorflow_h5py_glibc(ec, eprefix): current_opts = current_opts.split() ec['buildopts'] = current_opts + [ - '--linkopt=-Wl,--disable-new-dtags --host_linkopt=-Wl,--disable-new-dtags --action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --host_action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc ', + '--linkopt=-Wl,--disable-new-dtags --host_linkopt=-Wl,--disable-new-dtags --action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc --host_action_env=GCC_HOST_COMPILER_PATH=$EBROOTGCC/bin/gcc', ] ec['pretestopts'] = ( @@ -1895,8 +1895,8 @@ def post_easyblock_hook(self, *args, **kwargs): 'Mesa': parse_hook_mesa_use_llvm_minimal, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'pybind11': parse_hook_pybind11_replace_catch2, - 'TensorFlow': parse_hook_tensorflow_h5py_glibc, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, + 'TensorFlow': parse_hook_tensorflow_h5py_glibc, 'UCX': parse_hook_ucx_eprefix, } From 0ad9b6c2a587d6d5171aa043247e9b20eb100617 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Sat, 28 Feb 2026 10:28:25 +0100 Subject: [PATCH 5/5] Added hash for x86_64 --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index bf244e12..e86728e2 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -664,7 +664,7 @@ def parse_hook_tensorflow_h5py_glibc(ec, eprefix): 'content = content.replace("h5py==3.11.0 \\\\", "h5py==3.15.1 \\\\")\n' 'content = content.replace(\n' ' " --hash=sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0",\n' - ' " --hash=sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0 \\\\\\n --hash=sha256:8a33bfd5dfcea037196f7778534b1ff7e36a7f40a89e648c8f2967292eb6898e"\n' + ' " --hash=sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0 \\\\\\n --hash=sha256:25c8843fec43b2cc368aa15afa1cdf83fc5e17b1c4e10cd3771ef6c39b72e5ce \\\\\\n --hash=sha256:8a33bfd5dfcea037196f7778534b1ff7e36a7f40a89e648c8f2967292eb6898e"\n' ')\n' 'with open("requirements_lock_3_12.txt", "w") as f:\n' ' f.write(content)\n'