Created
December 16, 2020 17:54
-
-
Save jcrist/32ebc23ab1b4865fcf44fa9dda992d07 to your computer and use it in GitHub Desktop.
Prefect Example using KubernetesRun
This file contains hidden or 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.run_configs import KubernetesRun | |
from prefect.storage import Docker | |
with Flow("kubernetes-example") as flow: | |
# Add tasks to flow here... | |
# Run on Kubernetes with a custom resource configuration | |
flow.run_config = KubernetesRun(cpu_request=2, memory_request="4Gi") | |
# 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