Skip to content

Commit

Permalink
[KubeRay] [Doc] [Clusters] Fix RayCluster quickstart and VM quickstar…
Browse files Browse the repository at this point in the history
…t for mac (#43781)

* Update RayCluster deployment instructions for ARM64 and x86-64

Signed-off-by: Archit Kulkarni <[email protected]>

* Update socket.gethostbyname() to use 'localhost' instead of socket.gethostname()

Signed-off-by: Archit Kulkarni <[email protected]>

* Lint

Signed-off-by: Archit Kulkarni <[email protected]>

* Lint

Signed-off-by: Archit Kulkarni <[email protected]>

---------

Signed-off-by: Archit Kulkarni <[email protected]>
  • Loading branch information
architkulkarni committed Mar 7, 2024
1 parent 564e7ca commit 8aa35d6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/source/cluster/doc_code/simple-trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@ray.remote
def f():
time.sleep(1)
return socket.gethostbyname(socket.gethostname())
return socket.gethostbyname("localhost")


# The following takes one second (assuming that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,26 @@ KubeRay offers multiple options for operator installations, such as Helm, Kustom

Once the KubeRay operator is running, we are ready to deploy a RayCluster. To do so, we create a RayCluster Custom Resource (CR) in the `default` namespace.

```sh
# Deploy a sample RayCluster CR from the KubeRay Helm chart repo:
helm install raycluster kuberay/ray-cluster --version 1.1.0-rc.0
::::{tab-set}

:::{tab-item} ARM64 (Apple Silicon)
```sh
# Deploy a sample RayCluster CR from the KubeRay Helm chart repo:
helm install raycluster kuberay/ray-cluster --version 1.1.0-rc.0 --set 'image.tag=2.9.0-aarch64'
```
:::

:::{tab-item} x86-64 (Intel/Linux)
```sh
# Deploy a sample RayCluster CR from the KubeRay Helm chart repo:
helm install raycluster kuberay/ray-cluster --version 1.1.0-rc.0
```
:::

::::


```sh
# Once the RayCluster CR has been created, you can view it by running:
kubectl get rayclusters

Expand Down
6 changes: 3 additions & 3 deletions doc/source/cluster/vms/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ We will write a simple Python application that tracks the IP addresses of the ma
def f():
time.sleep(0.001)
# Return IP address.
return socket.gethostbyname(socket.gethostname())
return socket.gethostbyname("localhost")
ip_addresses = [f() for _ in range(10000)]
print(Counter(ip_addresses))
Expand All @@ -165,7 +165,7 @@ With some small changes, we can make this application run on Ray (for more infor
def f():
time.sleep(0.001)
# Return IP address.
return socket.gethostbyname(socket.gethostname())
return socket.gethostbyname("localhost")
object_ids = [f.remote() for _ in range(10000)]
ip_addresses = ray.get(object_ids)
Expand All @@ -192,7 +192,7 @@ Finally, let's add some code to make the output more interesting:
def f():
time.sleep(0.001)
# Return IP address.
return socket.gethostbyname(socket.gethostname())
return socket.gethostbyname("localhost")
object_ids = [f.remote() for _ in range(10000)]
ip_addresses = ray.get(object_ids)
Expand Down

0 comments on commit 8aa35d6

Please sign in to comment.