Finding the Ray Dashboard URL from a worker

Is there any way to find the Ray dashboard URL or something I can use to create the. JobSubmissionClient from inside a Ray task?

Currently, I’m doing something like:

  dashboard_url = ray.init(ignore_reinit_error=True).dashboard_url
  client = ray.job_submission.JobSubmissionClient(f"http://{dashboard_url}")

but this seems a little hacky.

Do you override the dashboard URL? If not, it should be the default: http://localhost:8265 .