I assume you mean Richard from Coiled? 🙂
The way such partnerships work is that the partner provides the compute infrastructure that can be easily integrated with Prefect. For example, you could set up your cluster with GPUs in your Coiled account and use that in your Prefect flow. Here is an example flow from
@Kevin Kho:
import coiled
from prefect import task, Flow
import torch
import prefect
from prefect.executors import DaskExecutor
from prefect.storage import GitHub
@task
def abc(x):
logger = prefect.context.get("logger")
<http://logger.info|logger.info>(torch.cuda.is_available())
<http://logger.info|logger.info>(torch.cuda.device_count())
<http://logger.info|logger.info>(f"Map index {x}")
return x
with Flow("gpu-test") as flow:
abc.map([1,2,3,4])
coiled.create_software_environment(
name="gpu-env4",
container="gpuci/miniconda-cuda:10.2-runtime-ubuntu18.04",
conda={
"channels": ["conda-forge", "defaults", "fastchan"],
"dependencies": [
"python==3.8.5",
"pytorch",
"torchvision",
"cudatoolkit=10.2",
"prefect",
"fastai",
"scikit-image",
"numpy",
"dask",
"bokeh>=0.13.0",
"dask-cuda",
"prefect",
"pandas"
]
})
executor = DaskExecutor(
cluster_class=coiled.Cluster,
cluster_kwargs={
"software": "kvnkho/gpu-env4",
"n_workers": 2,
"shutdown_on_close": True,
"name": "prefect-executor",
"worker_memory": "4 GiB",
"worker_gpu": 1,
"backend_options":{"spot": False}
},
)
flow.executor = executor
flow.storage = GitHub(repo="kvnkho/demos", path="/prefect/coiled_gpu.py", ref="main")
flow.register("dremio")
So you can see that you can spin up a software environment with GPUs and with all dependencies required by your image recognition code.
There are additional options such as using a Kubernetes cluster e.g. AWS EKS with GPUs and you can easily spin up such cluster using
eksctl.
Finally, with Orion, this will become even easier thanks to
annotations.