flytekitplugins-perian


Nameflytekitplugins-perian JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryFlyte agent for Perian Job Platform (perian.io)
upload_time2024-06-13 14:22:24
maintainerNone
docs_urlNone
authorOmar Tarabai
requires_python>=3.8
licenseapache2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install flytekitplugins-perian
```

## Getting Started

This plugin allows executing `PythonFunctionTask` on Perian.

An [ImageSpec](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/imagespec.html) 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](https://docs.flyte.org/en/latest/user_guide/productionizing/secrets.html) are required to be defined for the agent server:
* Perian credentials:
    * `perian_organization`
    * `perian_token`
* AWS credentials for accessing the Flyte storage bucket. These credentials are never logged and are stored only until it is used, then immediately deleted:
    * `aws_access_key_id`
    * `aws_secret_access_key`
* (Optional) Custom docker registry for pulling the Flyte image:
    * `docker_registry_url`
    * `docker_registry_username`
    * `docker_registry_password`

### Example

`example.py` workflow example:
```python
from flytekit import ImageSpec, task, workflow
from flytekitplugins.perian import PerianConfig

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

@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)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flytekitplugins-perian",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Omar Tarabai",
    "author_email": "otarabai@perian.io",
    "download_url": null,
    "platform": null,
    "description": "# Flytekit Perian Job Platform Plugin\n\nFlyte Agent plugin for executing Flyte tasks on Perian Job Platform (perian.io).\n\nPerian Job Platform is still in closed beta. Contact support@perian.io if you are interested in trying it out.\n\nTo install the plugin, run the following command:\n\n```bash\npip install flytekitplugins-perian\n```\n\n## Getting Started\n\nThis plugin allows executing `PythonFunctionTask` on Perian.\n\nAn [ImageSpec](https://docs.flyte.org/en/latest/user_guide/customizing_dependencies/imagespec.html) need to be built with the perian agent plugin installed.\n\n### Parameters\n\nThe 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.\n* `cores`: Number of CPU cores\n* `memory`: Amount of memory in GB\n* `accelerators`: Number of accelerators\n* `accelerator_type`: Type of accelerator (e.g. 'A100'). For a full list of supported accelerators, use the perian CLI list-accelerators command.\n* `country_code`: Country code to run the job in (e.g. 'DE')\n\n### Credentials\n\nThe following [secrets](https://docs.flyte.org/en/latest/user_guide/productionizing/secrets.html) are required to be defined for the agent server:\n* Perian credentials:\n    * `perian_organization`\n    * `perian_token`\n* AWS credentials for accessing the Flyte storage bucket. These credentials are never logged and are stored only until it is used, then immediately deleted:\n    * `aws_access_key_id`\n    * `aws_secret_access_key`\n* (Optional) Custom docker registry for pulling the Flyte image:\n    * `docker_registry_url`\n    * `docker_registry_username`\n    * `docker_registry_password`\n\n### Example\n\n`example.py` workflow example:\n```python\nfrom flytekit import ImageSpec, task, workflow\nfrom flytekitplugins.perian import PerianConfig\n\nimage_spec = ImageSpec(\n    name=\"flyte-test\",\n    registry=\"my-registry\",\n    python_version=\"3.11\",\n    apt_packages=[\"wget\", \"curl\", \"git\"],\n    packages=[\n        \"flytekitplugins-perian>=1.0.1\",\n    ],\n)\n\n@task(container_image=image_spec,\n      task_config=PerianConfig(\n        accelerators=1,\n        accelerator_type=\"A100\",\n      ))\ndef perian_hello(name: str) -> str:\n    return f\"hello {name}!\"\n\n@workflow\ndef my_wf(name: str = \"world\") -> str:\n    return perian_hello(name=name)\n```\n",
    "bugtrack_url": null,
    "license": "apache2",
    "summary": "Flyte agent for Perian Job Platform (perian.io)",
    "version": "1.0.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6486cbcd7f8ad8ba52a1ec3bd7d7f8c87a9e5604415a19bf89dea5ceab1a064d",
                "md5": "b088f32622700762a5cb4f6f3b3acc68",
                "sha256": "2d8872a4c59867ee15fad6c44c78c9e17fe01bf5b19aa2e3e71fff55cb5c4d4d"
            },
            "downloads": -1,
            "filename": "flytekitplugins_perian-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b088f32622700762a5cb4f6f3b3acc68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7451,
            "upload_time": "2024-06-13T14:22:24",
            "upload_time_iso_8601": "2024-06-13T14:22:24.766034Z",
            "url": "https://files.pythonhosted.org/packages/64/86/cbcd7f8ad8ba52a1ec3bd7d7f8c87a9e5604415a19bf89dea5ceab1a064d/flytekitplugins_perian-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-13 14:22:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "flytekitplugins-perian"
}
        
Elapsed time: 0.38484s