From 3c4e9213e4a3315a12744b70275ce7a569b4ba31 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Thu, 6 Jun 2024 15:25:08 +0200 Subject: [PATCH] GL-1394: Add the EasyBuild files and a short readme --- easybuild/README.md | 17 ++++++ .../autosubmit-4-foss-2021b-Python-3.9.6.eb | 55 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 easybuild/README.md create mode 100644 easybuild/autosubmit-4-foss-2021b-Python-3.9.6.eb diff --git a/easybuild/README.md b/easybuild/README.md new file mode 100644 index 000000000..c5c5eafae --- /dev/null +++ b/easybuild/README.md @@ -0,0 +1,17 @@ +Files to build an EasyBuild installation for Autosubmit. + +Ref: https://earth.bsc.es/gitlab/es/autosubmit/-/issues/1257 + +Building locally, to test it first: + +```bash +$ docker login ghcr.io -u kinow +$ docker run --rm -ti \ + -u easybuild \ + -v $(pwd -P)/autosubmit-4-foss-2021b-Python-3.9.6.eb:/home/easybuild/autosubmit-4-foss-2021b-Python-3.9.6.eb \ + -w /home/easybuild ghcr.io/easybuilders/ubuntu-20.04:2024-01-17-7559408166.106 \ + /bin/bash +easybuild@e9c0fc4f3b5d:~$ pip install easybuild +easybuild@e9c0fc4f3b5d:~$ export PATH="$PATH:/home/easybuild/.local/bin:/usr/lmod/8.6.12/libexec/" +easybuild@e9c0fc4f3b5d:~$ EB_VERBOSE=1 eb autosubmit-*.eb --rebuild +``` diff --git a/easybuild/autosubmit-4-foss-2021b-Python-3.9.6.eb b/easybuild/autosubmit-4-foss-2021b-Python-3.9.6.eb new file mode 100644 index 000000000..4834364d3 --- /dev/null +++ b/easybuild/autosubmit-4-foss-2021b-Python-3.9.6.eb @@ -0,0 +1,55 @@ +easyblock = "PythonPackage" + +name = 'autosubmit' +version = 'v4.1.6' + +homepage = 'http://autosubmit.readthedocs.org' +description = """A versatile tool for managing ESM on HPC platforms""" + +toolchain = SYSTEM +#toolchain = {'name': 'foss', 'version': '2021b'} + +#sources = [SOURCELOWER_TAR_GZ] +#source_urls = ['https://pypi.python.org/packages/source/a/autosubmit'] + +sources = ['autosubmit-%(version)s.tar.gz'] + +python = 'Python' +pyver = '3.8.10' +pyshortver = '3.6' +versionsuffix = '-%s-%s' % (python, pyver) + +# Numpy 1.21 is the last release with 3.7+ support. +# Numpy 1.24 is the last release with 3.8+ support. +# Numpy 1.25 and greater requires 3.9+. +# https://endoflife.date/numpy#python-support +# Since our current setup.py declares 3.7 as minimum requirement, +# this function patches the setup.py file temporarily. +preinstallopts = """if grep -E "numpy<2" setup.py ; then \ + sed -i "s/numpy<2/numpy<1.22/g" setup.py ; \ +else \ + sed -i "s/install_requires\s*=\s*\[/install_requires=\['numpy<1.22',/g" setup.py ; \ +fi ;\ +if grep -E "matplotlib" setup.py ; then \ + +fi \ +&& +""" + +dependencies = [ +# (python, pyver), +# ('libpng','1.6.37'), +] + +#use_pip = True +# override extensions sanity check, default filter that imports a Python module doesn't work here +exts_filter = ('', "") + +sanity_check_paths = { + 'files': ['bin/autosubmit'], + 'dirs': [], +} + +#sanity_check_commands = [('autosubmit -v','')] + +moduleclass = 'tools' -- GitLab