https://flyte.org logo
#flyte-on-gcp
Title
# flyte-on-gcp
a

Ashika UMAGILIYA

09/13/2023, 1:02 AM
#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

Samhita Alla

09/13/2023, 4:55 AM
a

Ashika UMAGILIYA

09/13/2023, 5:02 AM
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

Samhita Alla

09/13/2023, 5:16 AM
This is currently being worked on. Please refer to this discussion: https://github.com/flyteorg/flyte/discussions/3796. cc @Yee
a

Ashika UMAGILIYA

09/13/2023, 6:20 AM
thank you, let me look into this
5 Views