diff --git a/docs/available_software/css/software.css b/docs/available_software/css/software.css new file mode 100644 index 0000000000..011cb4ae4c --- /dev/null +++ b/docs/available_software/css/software.css @@ -0,0 +1,129 @@ +.software-name { + font-size: 0.9rem; + font-weight: 700; + color: var(--md-primary-fg-color); +} + +.software-versions { + font-size: 0.6rem; + font-style: italic; + margin-left: 0.2rem; +} + +.software-link a { + font-size: 0.6rem; + color: var(--md-typeset-a-color); +} + +.software-more-info a { + float: right; + font-size: 0.6rem; + font-style: italic; +} + +.software-description { + font-size: 0.7rem; +} + +.software-cpus { + font-size: 0.65rem; + font-style: italic; +} + +.software-gpus { + font-size: 0.65rem; + font-style: italic; +} + +.software-cpu-amd { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(0,0,0); /* https://www.brandcolorcode.com/advanced-micro-devices-amd */ + color: var(--md-primary-bg-color); + margin-right: 0.3em; +} + +.software-cpu-arm { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(0,145,189); /* https://www.brandcolorcode.com/arm-company */ + color: var(--md-primary-bg-color); + margin-right: 0.3em; +} + +.software-cpu-intel { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(0,199,253); /* https://www.brandcolorcode.com/intel */ + color: rgb(0,0,0); + margin-right: 0.3em; +} + +.software-cpu-riscv { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(253,181,21); /* https://riscv.org/about/brand-guidelines */ + color: rgb(0,50,98); + margin-right: 0.3em; +} + +.software-gpu-amd { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(0,0,0); /* https://www.brandcolorcode.com/advanced-micro-devices-amd */ + color: var(--md-primary-bg-color); + margin-right: 0.3em; +} + +.software-gpu-nvidia { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: rgb(118,185,0); /* https://www.brandcolorcode.com/nvidia */ + color: rgb(0,0,0); + margin-right: 0.3em; +} + +.software-eessi-versions { + font-size: 0.65rem; + font-style: italic; +} + +.software-eessi-version-202306 { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: darkslateblue; /* https://www.w3schools.com/cssref/css_colors.php */ + color: var(--md-primary-bg-color); + margin-right: 0.3em; +} + +.software-eessi-version-202506 { + display: inline-block; + padding: 0.15em 0.5em; + border-radius: 0.8em; + font-size: 0.8em; + font-style: normal; + background-color: darkslategrey; /* https://www.w3schools.com/cssref/css_colors.php */ + color: var(--md-primary-bg-color); + margin-right: 0.3em; +} diff --git a/docs/available_software/css/style_table.css b/docs/available_software/css/style_table.css deleted file mode 100644 index 68443b2528..0000000000 --- a/docs/available_software/css/style_table.css +++ /dev/null @@ -1,29 +0,0 @@ -/* source https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.css */ - -/* - * # Fomantic UI - 2.9.2 - * https://github.com/fomantic/Fomantic-UI - * https://fomantic-ui.com/ - * - * Copyright 2023 Contributors - * Released under the MIT license - * https://opensource.org/licenses/MIT - * - */ -.ui.table{ - font-size: 1em; - width: 100%; - background: #fff; - margin: 1em 0; - border: 1px solid rgba(34, 36, 38, .15); - box-shadow: none; - border-radius: .28571429rem; - text-align: left; - vertical-align: middle; - color: rgba(0, 0, 0, .87); - border-collapse: separate; - border-spacing: 0; - } -.ui.celled.table>tbody>tr>td,.ui.celled.table>tbody>tr>th,.ui.celled.table>tfoot>tr>td,.ui.celled.table>tfoot>tr>th,.ui.celled.table>thead>tr>th,.ui.celled.table>tr>td,.ui.celled.table>tr>th{ - border-left:1px solid rgba(34,36,38,.1); - } \ No newline at end of file diff --git a/docs/available_software/index.md b/docs/available_software/index.md new file mode 100644 index 0000000000..b1538b26d9 --- /dev/null +++ b/docs/available_software/index.md @@ -0,0 +1,59 @@ +{% set data = load_json_eessi_software() %} +{% set software = data.software %} +{% set extensions = data.extensions %} + +# Software available in EESSI + +{{ data.n_software }} unique software projects are currently available in EESSI (+ {{ data.n_extensions }} unique extensions) + + + +
+ +{% for pkg in software %} +{% set pkg_slug = pkg.name | replace(' ', '-') %} +- + + {{ pkg.name }} + + (more details) +
+ {{ pkg.homepages }} +
+

+ {{ pkg.description }} +

+ Available in EESSI versions: {% if '2023.06' in pkg.eessi_versions -%}2023.06{% endif %}{% if '2025.06' in pkg.eessi_versions -%}2025.06{% endif %} +
+ Supported CPU families: {% if 'AMD' in pkg.cpu_families -%}AMD{% endif %}{% if 'Intel' in pkg.cpu_families -%}Intel{% endif %}{% if 'Arm' in pkg.cpu_families -%}Arm{% endif %}{% if 'RISC-V' in pkg.cpu_families -%}RISC-V{% endif %} +
+ Supported GPU families: AMD NVIDIA +
+
+{% endfor %} + +{% for ext in extensions.values() %} +{% set ext_slug = ext.name | replace(' ', '-') %} +- + {{ ext.name }} (extension) +
+

+ {% if ext.type == "python" -%} Python package{% elif ext.type == "r" -%}R library{% elif ext.type == "perl" -%}Perl module{% endif %} included as extension to the following + software installations: +

+
+{% endfor %} + +
+ +Last update: {{ data.timestamp }} diff --git a/docs/available_software/javascripts/populate_overview.js b/docs/available_software/javascripts/populate_overview.js deleted file mode 100644 index 3f2bd69ae5..0000000000 --- a/docs/available_software/javascripts/populate_overview.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright 2023-2023 Ghent University - * - * - * SPDX license identifier: GPL-3.0-or-later - * - * @author: Michiel Lachaert, Kenneth Hoste (HPC-UGent) - */ - -/** - * A function that populates the table on the module overview page with information about all the available modules. - */ -function populate_overview(json_data) { - fetch(json_data) - .then((response) => response.json()) - .then((json) => { - // Set generated time - const p = document.getElementById("time") - p.innerText = `This data was automatically generated ${json.time_generated}` - - - // CONSTRUCT TABLE - - // list with all the names of the targets - const all_targets = json.targets.map(x => { - //Todo: split up the strings of the targets to automate the hierarchy of the table header - console.log(x) - let pathArray = x.split("/") - pathArray = pathArray.slice(7) - console.log(pathArray) - console.log(pathArray[pathArray.length -1]) - x = pathArray[pathArray.length -1] - //x = pathArray - return ({"title": x}) - }) - console.log(all_targets) - console.log([...[{"title": "name"}], ...all_targets]) - const table = new DataTable('#overview_table', { - columns: [...[{"title": "name"}], ...all_targets], - paging: true, - columnDefs: [ - { - targets: "_all", - className: 'dt-body-center' - } - ], - scrollX: true, - }); - console.log(table) - - - // ADD DATA - let new_rows = []; - - // list_avaible contains a list with booleans. - // These booleans indicates if the software is available on the corresponding cluster. - for (const [software, list_available] of Object.entries(json.modules)) { - let new_row = [`${software}`]; - list_available.forEach(bool => new_row.push(bool ? "x" : "-")); - new_rows.push(new_row); - } - - table.rows.add(new_rows).draw(); - }) -} - -// Only start populating the table if the correct page has been loaded. -document$.subscribe(function() { - if (document.getElementById("overview_table")) { - populate_overview("../data/json_data.json") - } -}) diff --git a/docs/available_software/javascripts/software-filter.js b/docs/available_software/javascripts/software-filter.js new file mode 100644 index 0000000000..72a6a0d5bf --- /dev/null +++ b/docs/available_software/javascripts/software-filter.js @@ -0,0 +1,15 @@ +document.addEventListener("DOMContentLoaded", () => { + const input = document.getElementById("software-search"); + const cards = document.querySelectorAll(".software-card"); + + input.addEventListener("input", () => { + const q = input.value.toLowerCase(); + + cards.forEach(card => { + const li = card.closest("li"); + const text = card.dataset.search.toLowerCase(); + li.style.display = text.includes(q) ? "" : "none"; + }); + }); +}); + diff --git a/docs/available_software/overview.md b/docs/available_software/overview.md deleted file mode 100644 index 7744cf043f..0000000000 --- a/docs/available_software/overview.md +++ /dev/null @@ -1,37 +0,0 @@ -# Available software (via modules) - -This table gives an overview of all the available software in EESSI per specific CPU target. - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nameaarch64x86_64
nvidiaamdintel
diff --git a/docs/index.md b/docs/index.md index d149b164ac..c1eeb9392b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,7 +26,7 @@ For users: * [`software.eessi.io` repository](repositories/software.eessi.io.md) * [Access](getting_access/is_eessi_accessible.md), [initialize](using_eessi/setting_up_environment.md) and [use](using_eessi/basic_commands.md) EESSI -* [Overview of software](available_software/overview.md) +* [Overview of software](available_software/index.md) * [How to run EESSI test suite](test-suite/index.md) * [How to use EESSI in CI](using_eessi/eessi_in_ci.md) - [GitHub Actions](using_eessi/eessi_in_ci.md/#the-eessi-github-action) diff --git a/docs/repositories/software.eessi.io.md b/docs/repositories/software.eessi.io.md index bb10383ab3..da650fe571 100644 --- a/docs/repositories/software.eessi.io.md +++ b/docs/repositories/software.eessi.io.md @@ -22,7 +22,7 @@ See [Using EESSI](../using_eessi/setting_up_environment.md). ## Available software -See [Available software](../available_software/overview.md). +See [Available software](../available_software/index.md). ### Architecture and micro-architecture support diff --git a/main.py b/main.py new file mode 100644 index 0000000000..5b1c047588 --- /dev/null +++ b/main.py @@ -0,0 +1,93 @@ +import json +import urllib.request +from pathlib import Path + +CPU_ARCHS = { + 'x86_64': ['AMD', 'Intel'], + 'aarch64': ['Arm'], + 'riscv64': ['RISC-V'], +} + + +def define_env(env): + @env.macro + def load_json(path): + full_path = Path(path) + with full_path.open() as f: + return json.load(f) + + @env.macro + def load_json_url(url): + with urllib.request.urlopen(url) as response: + return json.loads(response.read().decode("utf-8")) + + @env.macro + def load_json_eessi_software(): + url = 'https://www.eessi.io/api_data/data/eessi_api_metadata_software.json' + with urllib.request.urlopen(url) as response: + data = json.loads(response.read().decode('utf-8')) + + data_software = data['software'] + names = data['software'].keys() + + print(f"{names=}") + + res = { + 'timestamp': data['timestamp'], + 'n_software': len(names), + 'software': [], + 'extensions': {}, + } + for name in sorted(names): + name_data = data['software'][name] + versions = name_data['versions'] + + # use description is last version + descr = ' '.join(versions[-1]['description'].strip().splitlines()) + descr = descr.replace('<', 'less than ').replace('>', 'more than ') + + # use all homepages + homepages = set(x['homepage'].rstrip('/') for x in versions) + homepages = ', '.join("%(h)s" % {'h': h} for h in homepages) + + licenses = ', '.join(y for x in versions for y in x['license']) + + # determine set of supported CPU families (first part of CPU target names, like x86_64 or aarch64) + cpu_families = set(c for v in versions for x in v['cpu_arch'] for c in CPU_ARCHS[x.split('/')[0]]) + + # EESSI versions in which this software is available + eessi_versions = set() + + software = { + 'name': name, + 'homepages': homepages, + 'description': descr, + 'n_versions': len(versions), + 'licenses': licenses, + 'cpu_families': ', '.join(x for x in sorted(cpu_families)), + } + + for version in versions: + + req_mods = version['required_modules'] + if req_mods and req_mods[0].get('module_name') == 'EESSI': + eessi_versions.add(req_mods[0]['module_version']) + + for ext in version['extensions']: + ext_key = ext['type'] + ':' + ext['name'] + if ext_key in res['extensions']: + res['extensions'][ext_key]['parents'].add(name) + else: + res['extensions'][ext_key] = { + 'name': ext['name'], + 'type': ext['type'], + 'parents': set([name]), + } + + software['eessi_versions'] = ', '.join(sorted(eessi_versions)) + + res['software'].append(software) + + res['n_extensions'] = len(res['extensions']) + + return res diff --git a/mkdocs.yml b/mkdocs.yml index 4f767ceefc..a11d09f968 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,14 +23,13 @@ nav: - Software layer: software_layer.md - Supported CPU targets: software_layer/cpu_targets.md - Supported GPU targets: software_layer/gpu_targets.md - - Available software and repositories: - - Software: available_software/overview.md - - Repositories: - - Production: - - Software: repositories/software.eessi.io.md - - Versions: repositories/versions.md - - RISC-V: repositories/riscv.eessi.io.md - - Development repository: repositories/dev.eessi.io.md + - Available software: available_software/index.md + - Repositories: + - Production: + - Software: repositories/software.eessi.io.md + - Versions: repositories/versions.md + - RISC-V: repositories/riscv.eessi.io.md + - Development repository: repositories/dev.eessi.io.md - Installation and configuration: - Is EESSI already installed?: getting_access/is_eessi_accessible.md - Native: getting_access/native_installation.md @@ -102,6 +101,10 @@ plugins: - macros - redirects: redirect_maps: + # useful easy-to-remember short URLs, don't remove these! + gpu.md: site_specific_config/gpu.md + rocm.md: site_specific_config/rocm.md + # redirects for pages that were moved at some point adding_software.md: adding_software/overview.md contributing_sw/building_software.md: adding_software/building_software.md contributing_sw/contribution_policy.md: adding_software/contribution_policy.md @@ -111,8 +114,7 @@ plugins: contributing_sw/overview.md: adding_software/overview.md software_layer/adding_software.md: adding_software/overview.md pilot.md: repositories/pilot.md # https://www.eessi.io/docs/pilot is mentioned in the EESSI open access paper - gpu.md: site_specific_config/gpu.md - rocm.md: site_specific_config/rocm.md + available_software/overview.md: available_software/index.md # training/ was renamed to training-events/ + subdirectory was removed for Happy Hour sessions training/index.md: training-events/index.md training/happy-hours-sessions.md: training-events/happy-hours-sessions.md @@ -211,13 +213,10 @@ extra: extra_javascript: # mermaid diagram - https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs - # javascript which generates overview of available software - - https://code.jquery.com/jquery-3.7.0.min.js - - https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js - - available_software/javascripts/populate_overview.js - - https://cdn.datatables.net/plug-ins/2.2.2/pagination/bootstrap_input.js + # javascript used in overview of available software + - available_software/javascripts/software-filter.js extra_css: # CSS for popultate_overview - https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css - - available_software/css/style_table.css - - https://cdn.datatables.net/2.2.2/css/dataTables.semanticui.css + - available_software/css/software.css + - https://cdn.datatables.net/2.2.2/css/dataTables.semanticui.cssoftwares