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.
Perian connector example usage
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.
import union
from flytekitplugins.perian_job import PerianConfig
image_spec = union.ImageSpec(
name="flyte-test",
registry="my-registry",
python_version="3.11",
apt_packages=["wget", "curl", "git"],
packages=[
"flytekitplugins-perian-job",
],
)PerianConfig configures PerianTask. Tasks specified with PerianConfig will be executed on Perian Job Platform.
@union.task(
container_image=image_spec,
task_config=PerianConfig(
accelerators=1,
accelerator_type="A100",
),
)
def perian_hello(name: str) -> str:
return f"hello {name}!"
@union.workflow
def my_wf(name: str = "world") -> str:
return perian_hello(name=name)