Resources allocation of ray serve in k8s

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

Hello, I have a question, that is when I set resources of a deployment like:

@serve.deployment(ray_actor_options={"num_gpus": 0.5})
def func_1(*args):
    return do_something_with_my_gpu()

When I use kuberay to deploy this deployment, how ray to achive the resources isolation, so that can make sure this deployment only use 50% of gpu.

In my understanding, the resources isolation of ray serve depend on the resources isolation of k8s (eg, some gpu virtualization plugins).

In other word, It should be allocate 0.5 GPU resources on the docker to run the serve.deployment.

Am I right? Thank you so much!