Skip to main content

A dagster plugin for the Perian Sky Platform

Project description

README for Dagster Integration with Perian

Introduction

This Dagster integration allows you to easily dockerize your codebase and execute it on the Perian platform, our serverless GPU environment. By leveraging this integration, you can streamline your workflow, enabling efficient code deployment and execution without the need for managing infrastructure.

Features

  • Dockerization: Automatically packages your codebase into a Docker container.
  • Serverless Execution: Runs your Docker containers on Perian’s scalable GPU infrastructure.
  • Ease of Use: Simple commands to get your project up and running quickly.

Prerequisites

  • Docker installed on your local machine.
  • Access to the Perian platform (ensure your account is set up).
  • Dagster installed in your project (follow the Dagster installation guide).

Ops

This integration introduces the following Dagster ops:

  1. containerize_codebase:

    • Packages your codebase into a Docker container, including the installation of any necessary dependencies.
    • Parameters:
      • path: Directory of the codebase.
      • dependency_file: Path to a requirements file (optional).
      • python_version: Version of Python to use in the Docker image.
      • image_name: Name for the Docker image.
      • tag: Tag for the Docker image (default is "latest").
      • docker_username, docker_password, docker_repository: Credentials for Docker Hub.
      • command: Command to run in the container.
      • parameters: Parameters for the command.
  2. create_perian_job:

    • Creates a job on the Perian platform using the Docker image built from your codebase.
    • Parameters:
      • image_name: Name of the Docker image.
      • tag: Tag of the Docker image.
      • docker_username, docker_password, docker_repository: Credentials for Docker Hub.
      • cores, memory, accelerators, accelerator_type, country_code, provider: Configuration for the job instance.
  3. get_perian_job:

    • Retrieves the status and logs of a job running on the Perian platform.
    • Input:
      • job_metadata: Metadata containing the job ID.
  4. cancel_perian_job:

    • Cancels a running job on the Perian platform.
    • Input:
      • job_metadata: Metadata containing the job ID.

Installation

  1. Install dagster-perian package:

     pip install dagster-perian
    

    or

     poetry add dagster-perian
    

Example

Here’s an example of how to define a Dagster job that utilizes the containerize_codebase and create_perian_job ops:

from dagster import job
from perian_job.resources import perian_job_resource
from perian_job.operations import create_perian_job, containerize_codebase

@job(resource_defs={"perian_job_manager": perian_job_resource})
def perian_job_flow():
    containerize_codebase()
    create_perian_job()

```yaml
resources:
  perian_job_manager:
    config:
      api_url: "https://api.perian.cloud"
      organization: "<your-perian-organization-name>"
      token: "<your-perian-token>"

ops:
  create_perian_job:
    config:
      accelerators: 1
      accelerator_type:"A100"
      image_name: "<your-image-name>"
      tag: "<your-image-tag>"
      docker_username: "<your-docker-username>"
      docker_password: "<your-docker-password>"

  containerize_codebase:
    config:
      path: "<your-code-base-to-be-dockerized>"
      image_name: "<your-image-name>"
      tag: "<your-image-tag>"
      python_version: "<python-version-to-be-used>"
      docker_username: "<your-docker-username>"
      docker_password: "<your-docker-password>"
      command: "<running-script-or-module>"
      parameters: "<command-parameters>"

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

dagster_perian-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

dagster_perian-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dagster_perian-0.1.1.tar.gz.

File metadata

  • Download URL: dagster_perian-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dagster_perian-0.1.1.tar.gz
Algorithm Hash digest
SHA256 60dc28a77d2960a7990d045933684dd3af7a9461248c3220a6e429c7b52ed029
MD5 8129c9157e0d443fd21b1125929b15e2
BLAKE2b-256 9277b37b93ef345513f08640452990e018511d315380c0dc87dff9efed4bc36b

See more details on using hashes here.

File details

Details for the file dagster_perian-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_perian-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2dbb7ae8e13fc1fc204463b696941e5dd5760e8707739f5436ee0c30120e48f3
MD5 c9890422e217c860efc8d318c32d09e5
BLAKE2b-256 3b73d0df40101eb47e4af2f4abc86be7b69cb895ab5fbf515ac0d7c46372c11f

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