Can some one please assist, How to choose particul...
# flyte-support
a
Can some one please assist, How to choose particular gke node and namespace to run my workflows on flyte
a
How to choose particular gke node
you could set a node affinity using Pod Templates. What is the reason to choose a particular node? is it for GPUs?
namespace to run my workflows on flyte
for every project-domain, Flyte not only creates a namespace but run the execution Pods there. But if you need to indicate a particular namespace, you can set it in the Helm chart using
namespace_mapping
a
Gracias. For Nodes, we have different nodes gpu, standard compute optimized, etc and I want to run on standard node which is requrest from client.
Can't we set through flyte config.yaml (.flyte/config.yaml)? Also, how to do namespace_mapping any document available Actually so many teams are working with their different works. I want to run on particular namespace and node without affecting their work
a
how to do namespace_mapping any document available
how did you install Flyte? is it flyte-binary or flyte-core? for flyte-binary for example it is set like this
Copy code
configuration:
  inline:
    namespace_mapping:
      template: "my_namespace"
for the "imperative" node selection, I'm afraid is not something you can set in the config.yaml. Unless I miss something, your heterogeneous cluster might be using Kubernetes taints, so from your workflow, you could define a Pod Template that sets matching tolerations for the standard nodes
a
I tried installing flyte through install.sh script and that above configuration need to set in config.yaml or some where else? For node selection I have to define in workflow.py file ? To select the particular node, is it correct?
also to create config.yaml file I use this command flytectl config init --host localhost:8088
Hi, I tried this question in "how to create workflow by mentioning node selector in gke" flyte AskAI It provided as below: To create a Flyte workflow with node selectors in GKE, you need to configure the node selectors in the FlytePropeller configuration and then use the @task decorator to specify the node selector for each task. Here’s how you can do it: Configure FlytePropeller: Update the FlytePropeller configuration to include the node selector labels. This is typically done in the flytepropeller config map. plugins: k8s: gpu-device-node-label: cloud.google.com/gke-accelerator gpu-partition-size-node-label: cloud.google.com/gke-gpu-partition-size gpu-unpartitioned-toleration: effect: NoSchedule key: cloud.google.com/gke-gpu-partition-size operator: Equal value: DoesNotExist Define Tasks with Node Selectors: Use the @task decorator to specify the node selector for each task. from flytekit import task, workflow, Resources @task(requests=Resources(cpu="1", memory="500Mi"), node_selector={"cloud.google.com/gke-accelerator": "nvidia-tesla-t4"}) def task_a() -> str: return "Output from task A" @task(requests=Resources(cpu="1", memory="500Mi"), node_selector={"cloud.google.com/gke-accelerator": "nvidia-tesla-v100"}) def task_b(input: str) -> str: return f"Output from task B with input: {input}" @workflow def my_workflow() -> str: a = task_a() b = task_b(input=a) return b In this example, task_a is scheduled on nodes with the label nvidia-tesla-t4, and task_b is scheduled on nodes with the label nvidia-tesla-v100. is this correct. If yes, what is the flyte propeller config file and where it will store?