Skip to main content

Flyte agent for Perian Job Platform (perian.io)

Project description

Flytekit Perian Job Platform Plugin

Flyte Agent plugin for executing Flyte tasks on Perian Job Platform (perian.io).

Perian Job Platform is still in closed beta. Contact support@perian.io if you are interested in trying it out.

To install the plugin, run the following command:

pip install flytekitplugins-perian-job

Getting Started

This plugin allows executing PythonFunctionTask on Perian.

An ImageSpec need to be built with the perian agent plugin installed.

Parameters

The following parameters can be used to set the requirements for the Perian task. If any of the requirements are skipped, it is replaced with the cheapest option. At least one requirement value should be set.

  • cores: Number of CPU cores
  • memory: Amount of memory in GB
  • accelerators: Number of accelerators
  • accelerator_type: Type of accelerator (e.g. 'A100'). For a full list of supported accelerators, use the perian CLI list-accelerators command.
  • country_code: Country code to run the job in (e.g. 'DE')

Credentials

The following secrets are required to be defined for the agent server:

  • Perian credentials:
    • perian_organization
    • perian_token
  • For accessing the Flyte storage bucket, you need to add either AWS or GCP credentials. These credentials are never logged by Perian and are only stored until then are used, then immediately deleted.
    • AWS credentials:
      • aws_access_key_id
      • aws_secret_access_key
    • GCP credentials:
      • google_application_credentials. This should be the full json credentials.
  • (Optional) Custom docker registry for pulling the Flyte image:
    • docker_registry_url
    • docker_registry_username
    • docker_registry_password

Example

example.py workflow example:

from flytekit import ImageSpec, task, workflow
from flytekitplugins.perian_job import PerianConfig

image_spec = ImageSpec(
    name="flyte-test",
    registry="my-registry",
    python_version="3.11",
    apt_packages=["wget", "curl", "git"],
    packages=[
        "flytekitplugins-perian-job",
    ],
)

@task(container_image=image_spec,
      task_config=PerianConfig(
        accelerators=1,
        accelerator_type="A100",
      ))
def perian_hello(name: str) -> str:
    return f"hello {name}!"

@workflow
def my_wf(name: str = "world") -> str:
    return perian_hello(name=name)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flytekitplugins_perian_job-1.13.6b2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flytekitplugins_perian_job-1.13.6b2.tar.gz.

File metadata

File hashes

Hashes for flytekitplugins_perian_job-1.13.6b2.tar.gz
Algorithm Hash digest
SHA256 e70b1993debbf99f96d21cd147a2c21906f96de00e7b65ee592e4921d201695d
MD5 5c7f9b70c57176c93b728d40a4a171db
BLAKE2b-256 d20fbd01e47c520d5c69c0174a78d48f5b57f3411976a9ca49c742ddf650f763

See more details on using hashes here.

File details

Details for the file flytekitplugins_perian_job-1.13.6b2-py3-none-any.whl.

File metadata

File hashes

Hashes for flytekitplugins_perian_job-1.13.6b2-py3-none-any.whl
Algorithm Hash digest
SHA256 085a9c25400f66b70d6c37a48498f30a8cfb1a8ec1ef548cae27d6091b0b0779
MD5 b6d8dfecdc23235c354b0b2928a2ff71
BLAKE2b-256 71574b9203184efa108610162542bf6d7126d4a287279db6423b9d04937f5a05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page