<#CP2HDHKE1|ask-the-community> hi team, i managed ...
# flyte-on-gcp
a
#ask-the-community hi team, i managed to setup a simple cluster on GKE . Now I want to check how workflows spin off GPUs and modified the hello_world example as follows :
Copy code
from flytekit import task, workflow, Resources


@task(requests=Resources(cpu="1", gpu="1", mem="1Gi"),
	  container_image="<http://ghcr.io/flyteorg/flytecookbook:kfpytorch-latest|ghcr.io/flyteorg/flytecookbook:kfpytorch-latest>",)
def say_hello() -> str:
    return "Hello, World!"

@workflow
def hello_world_wf_gpu() -> str:
    res = say_hello()
    return res

if __name__ == "__main__":
    print(f"Running my_wf() {hello_world_wf_gpu()}")
When I run this workflow, I get the follow error . Any idea how to fix this ?
i guess need to specify the GPU type as documented here : https://cloud.google.com/kubernetes-engine/docs/how-to/autopilot-gpus#request-gpus
Copy code
spec:
  nodeSelector:
    <http://cloud.google.com/gke-accelerator|cloud.google.com/gke-accelerator>: GPU_TYPE
How to specify/pass this from the Task config ?
s
a
Thanks, but how we specify which GPU instance to use ? (vidia-tesla-t4,nvidia-tesla-a100 nvidia-a100-80gb) its not mentioned in the document
s
This is currently being worked on. Please refer to this discussion: https://github.com/flyteorg/flyte/discussions/3796. cc @Yee
a
thank you, let me look into this