Last active
December 16, 2020 17:57
-
-
Save jcrist/f1dd47f699554d9c1beff5ce553b5659 to your computer and use it in GitHub Desktop.
Prefect Example using KubernetesJobEnviornment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import Flow | |
from prefect.environments.execution import KubernetesJobEnvironment | |
from prefect.environments.storage import Docker | |
with Flow("kubernetes-example") as flow: | |
# Add tasks to flow here... | |
# Run on Kubernetes using a custom job specification | |
# This was needed to do even simple things like increase | |
# the job resource limits | |
flow.environment = KubernetesJobEnvironment(job_spec_file="job_spec.yaml") | |
# Store the flow in a docker image | |
flow.storage = Docker() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment