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..e86728e2 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -650,6 +650,45 @@ 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-2.18.1 + """ + 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:25c8843fec43b2cc368aa15afa1cdf83fc5e17b1c4e10cd3771ef6c39b72e5ce \\\\\\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', + ] + + 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" && """ + ) + print_msg("TensorFlow-h5py-glibc related changes have been applied") + else: + raise EasyBuildError("TensorFlow-h5py-glibc specific hook triggered for non-TensorFlow easyconfig?!") + + def parse_hook_ucx_eprefix(ec, eprefix): """Make UCX aware of compatibility layer via additional configuration options.""" if ec.name == 'UCX': @@ -1857,6 +1896,7 @@ def post_easyblock_hook(self, *args, **kwargs): 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'pybind11': parse_hook_pybind11_replace_catch2, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, + 'TensorFlow': parse_hook_tensorflow_h5py_glibc, 'UCX': parse_hook_ucx_eprefix, }