Marco Ruta
11/26/2024, 10:10 AMMarvin
11/26/2024, 10:10 AMshell
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
helm repo update
2. Create Namespaces:
- Create a new namespace in your Kubernetes cluster for the Prefect worker if you haven't already:
shell
kubectl create namespace prefect
3. Configure GPU Worker:
- Define a values.yaml
file for the worker that requires GPU access. In this file, specify the necessary GPU resource requests:
yaml
worker:
resources:
requests:
<http://nvidia.com/gpu|nvidia.com/gpu>: 1
- Deploy with Helm using this configuration:
shell
helm install gpu-worker prefect/prefect-helm -n prefect -f gpu-values.yaml
4. Configure Non-GPU Worker:
- For the worker that does not require GPU access, create a separate values.yaml
without specifying GPU resources:
yaml
worker:
# No GPU request
- Deploy with Helm:
shell
helm install non-gpu-worker prefect/prefect-helm -n prefect -f non-gpu-values.yaml
By using different values.yaml
files, you can set up your Kubernetes workers with distinct resource profiles, controlling their access to GPUs.
For additional details, check the Prefect Kubernetes guide here: Prefect Kubernetes Deployment Guide. If you encounter issues, don't hesitate to consult the Helm documentation or Prefect support forums. Good luck, and may your workflows flow smoothly like a fine cup of tea on a brisk morning!