Skip to content

(experimental) support for --exclude-labels and --include-labels for Easystack #3512

Open
@deniskristak

Description

@deniskristak

related to: easystack file pull request

Labels
Labels are a means to not build everything in the spec file, but only to select certain items that match with the labels specified on the command line.

For example, the spec file could contain

    GROMACS:
      toolchains:
        foss-2020a:
          versions:
            2020.1:
              exclude-labels: foo
            2020.2:
            2020.3:
              include-labels: bar

and the command line invocation could be

eb eessi-2020.09.yml --labels='foo'

Then, EasyBuild will nót build GROMACS-2020.1-foss-2020a.eb, because the command line contained the foo key, and the spec file specified that as a label to exclude (exclude-labels: foo). Furthermore, EasyBuild will also nót build GROMACS-2020.3-foss-2020a.eb, because the spec file specified that it should only be build if the bar label was passed (include-labels: bar) and bar wasn't a label on the command line.

Labels are not interpreted in any way by EasyBuild: it just matches the labels passed on the command line to the include-labels and exclude-labels keywords. The meaning of those labels is entirely up to the developer of the spec file and we suggest the labels are explained through comments at the top of the YAML file.

Practical usage would be:

The 'gpu' label can be used to indicate if you want GPU software to be build. If software has both CPU and GPU versions, passing the 'gpu' label will disable building the CPU version.

    GROMACS:
      toolchains:
        foss-2020a:
          exclude-labels: gpu
          versions: 2020.1
        fosscuda-2020a:
          include-labels: gpu
          versions: 2020.1

Then, a user who wants to build for a GPU based system can do:

eb eessi-2020.09.yml --labels='gpu'

Metadata

Metadata

Assignees

No one assigned

    Labels

    easystackIssues and PRs related to easystack filesenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions