Hera Runtime
The Hera runtime enables running Hera workflows on the platform. It defines Workflow objects of kind hera and supports build and pipeline task actions for workflow execution.
hera: Execute Hera workflows on Kubernetes
Prerequisites
Supported Python versions:
- Python ≥ 3.9, < 3.13
Required packages:
digitalhub-runtime-hera
Install from PyPI:
Usage overview
To execute Hera workflows on the platform:
- Implement a pipeline function that returns a Hera
Workflowobject (see Pipeline definition for detailed instructions on creating pipeline functions). - Use
dh.new_workflow()orproject.new_workflow()to create the workflow entity. - Build the pipeline by calling
workflow.run(action="build")(required). - Execute the pipeline with
workflow.run(action="pipeline"); a stepper will execute the Hera steps.
The runtime provides DSL helpers in digitalhub_runtime_hera.dsl. Use step and container_template to wrap digitalhub functions and workflows into Hera steps and container templates. The DSL supports both DAG and Steps contexts.
Core components:
step: defines an individual workflow step inside aDAGorStepscontext; it represents a task and can declare inputs, outputs and parameters.container_template: constructs a Hera container template (image, command, args). It is used bystepand also available for advanced custom templates.
See how to for detailed instructions on building and executing Hera workflows. See Examples for code samples.