[Core] ray installed from conda does not include the dashboard

See original GitHub issue

What happened + What you expected to happen

When initializing ray (ray.init() call) I get a bunch of outputs.

2022-12-01 14:30:35,649 ERROR services.py:1403 -- Failed to start the dashboard: Failed to start the dashboard, return code 0
 The last 10 lines of /tmp/ray/session_2022-12-01_14-30-33_539844_204848/logs/dashboard.log:
    raise ex
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 78, in __init__
    build_dir = setup_static_dir()
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 45, in setup_static_dir
    raise dashboard_utils.FrontendNotFoundError(
ray.dashboard.utils.FrontendNotFoundError: [Errno 2] Dashboard build directory not found. If installing from source, please follow the additional steps required to build the dashboard(cd py
thon/ray/dashboard/client && npm install && npm ci && npm run build): 'miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/client/build'

2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdaf99987f0>
2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
2022-12-01 14:30:35,649 ERROR services.py:1404 -- Failed to start the dashboard, return code 0
 The last 10 lines of /tmp/ray/session_2022-12-01_14-30-33_539844_204848/logs/dashboard.log:
    raise ex
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 78, in __init__
    build_dir = setup_static_dir()
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 45, in setup_static_dir
    raise dashboard_utils.FrontendNotFoundError(
ray.dashboard.utils.FrontendNotFoundError: [Errno 2] Dashboard build directory not found. If installing from source, please follow the additional steps required to build the dashboard(cd py
thon/ray/dashboard/client && npm install && npm ci && npm run build): 'miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/client/build'

2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdaf99987f0>
2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
Traceback (most recent call last):
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/_private/services.py", line 1389, in start_api_server
    raise Exception(err_msg + last_log_str)
Exception: Failed to start the dashboard, return code 0
 The last 10 lines of /tmp/ray/session_2022-12-01_14-30-33_539844_204848/logs/dashboard.log:
    raise ex
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 78, in __init__
    build_dir = setup_static_dir()
  File "miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/http_server_head.py", line 45, in setup_static_dir
    raise dashboard_utils.FrontendNotFoundError(
ray.dashboard.utils.FrontendNotFoundError: [Errno 2] Dashboard build directory not found. If installing from source, please follow the additional steps required to build the dashboard(cd py
thon/ray/dashboard/client && npm install && npm ci && npm run build): 'miniconda3/envs/test-env/lib/python3.8/site-packages/ray/dashboard/client/build'

2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdaf99987f0>
2022-12-01 14:30:35,465 ERROR base_events.py:1707 -- Unclosed client session
2022-12-01 14:30:35,770 INFO worker.py:1528 -- Started a local Ray instance.
RayContext(dashboard_url=None, python_version='3.8.15', ray_version='2.1.0', ray_commit='{{RAY_COMMIT_SHA}}', address_info={'node_ip_address': '10.241.129.69', 'raylet_ip_address':
'10.241.129.69', 'redis_address': None, 'object_store_address': '/tmp/ray/session_2022-12-01_14-30-33_539844_204848/sockets/plasma_store', 'raylet_socket_name': '/tmp/ray/session_2022-12-01
_14-30-33_539844_204848/sockets/raylet', 'webui_url': None, 'session_dir': '/tmp/ray/session_2022-12-01_14-30-33_539844_204848', 'metrics_export_port': 50699, 'gcs_address': '10.241.129.69:
53293', 'address': '10.241.129.69:53293', 'dashboard_agent_listen_port': 52365, 'node_id': 'debb9178951b5b35bfef390be04087813790aa34678c5619e910becc'})

(raylet) [2022-12-01 14:30:43,908 E 206329 206375] (raylet) agent_manager.cc:134: The raylet exited immediately because the Ray agent failed. The raylet fate shares with the agent. This can
 happen because the Ray agent was unexpectedly killed or failed. See `dashboard_agent.log` for the root cause.
2022-12-01 14:31:13,565 WARNING worker.py:1839 -- The node with node id: debb9178951b5b35bfef390be04087813790aa34678c5619e910becc and address: 10.241.129.69 and node name: 10.241.12
9.69 has been marked dead because the detector has missed too many heartbeats from it. This can happen when a   (1) raylet crashes unexpectedly (OOM, preempted node, etc.)
        (2) raylet has lagging heartbeats due to slow network or busy workload.

Versions / Dependencies

Ray 2.1.0 (installed from conda-forge) Python 3.8.15

The issue happens both on

NAME=“Ubuntu” VERSION=“20.04.4 LTS (Focal Fossa)” ID=ubuntu ID_LIKE=debian PRETTY_NAME=“Ubuntu 20.04.4 LTS” VERSION_ID=“20.04” HOME_URL=“https://www.ubuntu.com/” SUPPORT_URL=“https://help.ubuntu.com/” BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/” PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy” VERSION_CODENAME=focal UBUNTU_CODENAME=focal

and on

PRETTY_NAME=“Ubuntu 22.04.1 LTS” NAME=“Ubuntu” VERSION_ID=“22.04” VERSION=“22.04.1 LTS (Jammy Jellyfish)” VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL=“https://www.ubuntu.com/” SUPPORT_URL=“https://help.ubuntu.com/” BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/” PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy” UBUNTU_CODENAME=jammy

Reproduction script

import ray ray.init()

Issue Severity

High: It blocks me from completing my task.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mattipcommented, Dec 9, 2022

The dashboard is packaged separately: you need to install ray-dashboard.

$ conda create -c conda-forge -n ray_test python=3.8
$ conda activate ray_test
$ conda install -c conda-forge ray
# fails, there is no meta-package named ray
$ conda install -c conda-forge ray-default
# installs ray-core, ray-default but not the dashboard
$ python -c "import ray; ray.init(include_dashboard=True)"
# fails with messsages about "missing dashboard"
$ conda install -c conda-forge ray-dashboard
$ python -c "import ray; ray.init(include_dashboard=True)"
# succeeds

The master documentation is wrong, there is no conda package called ray, and installing ray-default does not install the dashboard. See conda-forge/ray-packages-feedstock#82

1reaction
iychengcommented, Dec 2, 2022

Hi @YarShev we have work here to fix this issue. @SongGuyang is leading this effort.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Ray — Ray 2.2.0 - the Ray documentation
Ray conda packages are maintained by the community, not the Ray team. While using a conda environment, it is recommended to install Ray...
Read more >
Ray Dashboard - :: Anaconda.org
Ray is a fast and simple framework for building and running distributed applications. It is split into ray-core, ray-default, ray-dashboard, ray-serve, ...
Read more >
installing ray using wheel in conda env - Stack Overflow
Looking more in-depth into the error, it seems like ray is trying to import the colorful module in that part of the code,...
Read more >
Troubleshooting — conda 22.11.1.post13+5eef286ca ...
Installing packages may produce a "connection failed" error if you do not have the certificates for a secure connection to the package repository....
Read more >
Intel® Distribution of Modin Getting Started Guide
The open-source Modin project is maintained not only by Intel, ... This includes Anaconda Conda-Forge channel, PyPI, and Build from Source options.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found