future-notebook-79388
07/13/2023, 1:27 PMgit clone <https://github.com/ray-project/kuberay.git>
cd kuberay
kubectl create -k ray-operator/config/default
When I submit the Ray workflow, rayjob, head and worker pods are getting created and also is up and running. But the Workflow is not getting submitted in the cluster and the job is in queue in console for more than 1 hour.
Script:
import typing
import ray
import time
from flytekit import Resources, task, workflow
from flytekitplugins.ray import HeadNodeConfig, RayJobConfig, WorkerNodeConfig
@ray.remote
def square(x):
return x * x
ray_config = RayJobConfig(
head_node_config=HeadNodeConfig(ray_start_params={"log-color": "True"}),
worker_node_config=[WorkerNodeConfig(group_name="ray-group", replicas=2)],
runtime_env={"pip": ["numpy", "pandas"]},
)
@task(task_config=ray_config, requests=Resources(mem="2000Mi", cpu="1"), limits=Resources(mem="3000Mi", cpu="2"))
def ray_task(n: int) -> typing.List[int]:
futures = [square.remote(i) for i in range(n)]
return ray.get(futures)
@workflow
def ray_workflow(n: int) -> typing.List[int]:
return ray_task(n=n)
if __name__ == "__main__":
print(ray_workflow(n=10))
future-notebook-79388
07/13/2023, 1:40 PMlemon-yacht-3709
07/13/2023, 4:40 PMhallowed-mouse-14616
07/13/2023, 4:54 PMglamorous-carpet-83516
07/13/2023, 4:56 PMglamorous-carpet-83516
07/13/2023, 4:57 PMfuture-notebook-79388
07/14/2023, 4:30 AMfuture-notebook-79388
07/14/2023, 4:30 AMglamorous-carpet-83516
07/14/2023, 4:31 AMfuture-notebook-79388
07/14/2023, 4:32 AMexport KUBERAY_VERSION=v0.5.2
kubectl create -k "<http://github.com/ray-project/kuberay/manifests/cluster-scope-resources?ref=${KUBERAY_VERSION}&timeout=90s|github.com/ray-project/kuberay/manifests/cluster-scope-resources?ref=${KUBERAY_VERSION}&timeout=90s>"
kubectl apply -k "<http://github.com/ray-project/kuberay/manifests/base?ref=${KUBERAY_VERSION}&timeout=90s|github.com/ray-project/kuberay/manifests/base?ref=${KUBERAY_VERSION}&timeout=90s>"
can you confirm on the installation stepsglamorous-carpet-83516
07/14/2023, 4:33 AMglamorous-carpet-83516
07/14/2023, 5:22 AMfuture-notebook-79388
07/14/2023, 5:23 AMglamorous-carpet-83516
07/14/2023, 6:23 AMglamorous-carpet-83516
07/14/2023, 6:24 AM