Pipeline environment

When setting up Pipelines, you have the option to use either a Studio environment or a container as the source for the pipeline's execution environment.

Using a Studio

In the example below, the pipeline utilizes the Studio environment to manage the execution of a job.

1/3
2/3
3/3
from lightning_sdk.pipeline import Pipeline, JobStep, Studio

studio = Studio(name="studio_env")

pipeline = Pipeline(name='pipeline_from_studio', studio=studio)
pipeline.run(
    steps=[
        JobStep(command="python main.py"),
    ],
)

Using a container

1/3
2/3
3/3
from lightning_sdk.pipeline import Pipeline, JobStep

pipeline = Pipeline(name='container_pipeline')

pipeline.run(
  steps=[
      JobStep(
        image="ubuntu:latest",
        command="echo 'Hello, World!'"
      )
  ]
)

Was this page helpful?

What went wrong?

↑↓ Navigate↵ Open⌘↵ New tabesc Close