1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

分散ライブラリrayをKubernetes上で動作させる

1
Posted at

install

git clone https://github.com/ray-project/ray.git 

run

cd ray/deploy/charts
helm -n ray install example-cluster --create-namespace ./ray

確認

$ kubectl -n ray get rayclusters
NAME              STATUS   RESTARTS   AGE
example-cluster                       10s

$ kubectl -n ray get pods
NAME                                    READY   STATUS    RESTARTS   AGE
example-cluster-ray-head-type-5926k     1/1     Running   0          57s
example-cluster-ray-worker-type-8gbwx   1/1     Running   0          40s
example-cluster-ray-worker-type-l6cvx   1/1     Running   0          40s

# A service exposing the Ray head node.
$ kubectl -n ray get service
NAME                       TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                       AGE
example-cluster-ray-head   ClusterIP   10.8.11.17   <none>        10001/TCP,8265/TCP,8000/TCP   115s

# The operator deployment.
# By default, the deployment is launched in namespace "default".
$ kubectl get deployment ray-operator
NAME           READY   UP-TO-DATE   AVAILABLE   AGE
ray-operator   1/1     1            1           3m1s

# The single pod of the operator deployment.
$ kubectl get pod -l cluster.ray.io/component=operator
NAME                            READY   STATUS    RESTARTS   AGE
ray-operator-84f5d57b7f-xkvtm   1/1     Running   0          3m35

# The Custom Resource Definition defining a RayCluster.
$ kubectl get crd rayclusters.cluster.ray.io
NAME                         CREATED AT
rayclusters.cluster.ray.io   2021-05-14T18:44:02

ダッシュボードを見る

$ kubectl -n ray port-forward service/example-cluster-ray-head 8265:8265
localhost:8265

Ray client を利用する

10001でheadのportを立ち上げます。

kubectl -n ray port-forward service/example-cluster-ray-head 10001:10001

その後、新しいターミナルで以下を実行

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?