The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
AWS Batch
Once you have a Union account, install union:
pip install unionExport the following environment variable to build and push images to your own container registry:
# replace with your registry name
export IMAGE_SPEC_REGISTRY="<your-container-registry>"Then run the following commands to run the workflow:
$ git clone https://github.com/unionai/unionai-examples
$ cd unionai-examples
$ union run --remote <path/to/file.py> <workflow_name> <params>The source code for this example can be found here.
from flytekit import task, workflow
from flytekitplugins.awsbatch import AWSBatchConfigUse this to configure SubmitJobInput for a AWS batch job. Task’s marked with this will automatically execute natively onto AWS batch service. Refer to the official AWS SubmitJobInput documentation for more detail.
config = AWSBatchConfig(
parameters={"codec": "mp4"},
platformCapabilities="EC2",
tags={"name": "flyte-example"},
)
@task(task_config=config)
def t1(a: int) -> int:
return a + 2
@task(task_config=config)
def t2(b: int) -> int:
return b * 10
@workflow
def my_wf(a: int) -> int:
b = t1(a=a)
return t2(b=b)
if __name__ == "__main__":
print(f"Running my_wf(a=3') {my_wf(a=3)}")