Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KubeRay] Add instructions to run distributed Ray Debugger in KubeRay #49116

Merged
merged 9 commits into from
Dec 9, 2024
39 changes: 38 additions & 1 deletion doc/source/ray-observability/ray-distributed-debugger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,44 @@ Create a new virtual environment and install dependencies.
Start a Ray cluster
~~~~~~~~~~~~~~~~~~~

Run `ray start --head` to start a Ray cluster.
.. tab-set::

.. tab-item:: Local

Run `ray start --head` to start a local Ray cluster.

.. tab-item:: KubeRay

Follow the instructions in :doc:`the RayCluster quickstart <../cluster/kubernetes/getting-started/raycluster-quick-start>` to set up a cluster.
You need to connect VS Code to the cluster. For example, add the following to the `ray-head` container and make sure `sshd` is running in the `ray-head` container.

.. code-block:: yaml

ports:
- containerPort: 22
name: ssd



.. note::

How to run `sshd` in the `ray-head` container depends on your setup. For example you can use `supervisord`.
A simple way to run `sshd` interactively for testing is by logging into the head node pod and running:

.. code-block:: bash

sudo apt-get install openssh-server
sudo mkdir -p /run/sshd
sudo /usr/sbin/sshd -D

You can then connect to the cluster via SSH by running:

.. code-block:: bash

kubectl port-forward service/raycluster-sample-head-svc 2222:22

After checking that `ssh -p 2222 ray@localhost` works, set up VS Code as described in the
`VS Code SSH documentation <https://code.visualstudio.com/docs/remote/ssh>`_.


Register the cluster
Expand Down
Loading