[Dashboard] Start the new dashboard (#9860)

This commit is contained in:
fyrestone
2020-08-13 11:01:46 +08:00
committed by GitHub
parent 16486a8df3
commit 739933e5b8
34 changed files with 1077 additions and 103 deletions
+27 -1
View File
@@ -1162,8 +1162,14 @@ def start_dashboard(require_dashboard,
raise ValueError("The given dashboard port {}"
" is already in use".format(port))
if "RAY_USE_NEW_DASHBOARD" in os.environ:
dashboard_dir = "new_dashboard"
else:
dashboard_dir = "dashboard"
dashboard_filepath = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "dashboard/dashboard.py")
os.path.dirname(os.path.abspath(__file__)), dashboard_dir,
"dashboard.py")
command = [
sys.executable,
"-u",
@@ -1398,6 +1404,23 @@ def start_raylet(redis_address,
if load_code_from_local:
start_worker_command += ["--load-code-from-local"]
# Create agent command
agent_command = [
sys.executable,
"-u",
os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"new_dashboard/agent.py"),
"--redis-address={}".format(redis_address),
"--node-manager-port={}".format(node_manager_port),
"--object-store-name={}".format(plasma_store_name),
"--raylet-name={}".format(raylet_name),
"--temp-dir={}".format(temp_dir),
]
if redis_password is not None and len(redis_password) != 0:
agent_command.append("--redis-password={}".format(redis_password))
command = [
RAYLET_EXECUTABLE,
"--raylet_socket_name={}".format(raylet_name),
@@ -1426,6 +1449,9 @@ def start_raylet(redis_address,
if start_initial_python_workers_for_first_job:
command.append("--num_initial_python_workers_for_first_job={}".format(
resource_spec.num_cpus))
if "RAY_USE_NEW_DASHBOARD" in os.environ:
command.append("--agent_command={}".format(
subprocess.list2cmdline(agent_command)))
if config.get("plasma_store_as_thread"):
# command related to the plasma store
plasma_directory, object_store_memory = determine_plasma_store_config(