Skip to content

Commit

Permalink
Add options for Ray dashboard address and port in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Movchan committed Nov 21, 2024
1 parent 0ac72c4 commit ed8a4dc
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion aana/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ def load_app(app_path: str):
type=str,
help="Address of the Ray cluster (default: auto)",
)
@click.option(
"--ray-dashboard-address",
default="127.0.0.1",
type=str,
help=(
"The host to bind the dashboard server to. Can either be "
"localhost (127.0.0.1) or 0.0.0.0 (available from all interfaces). "
"By default, this is set to localhost to prevent access from external machines."
),
)
@click.option(
"--ray-dashboard-port",
default=8265,
type=int,
help="The port to bind the dashboard server to (default: 8265)",
)
@click.option(
"--skip-migrations",
is_flag=True,
Expand All @@ -61,6 +77,8 @@ def deploy(
port: int,
hide_logs: bool,
ray_address: str,
ray_dashboard_address: str,
ray_dashboard_port: int,
skip_migrations: bool,
):
"""Deploy the application.
Expand All @@ -71,7 +89,14 @@ def deploy(
if not skip_migrations:
aana_app.migrate()
show_logs = not hide_logs
aana_app.connect(port=port, host=host, show_logs=show_logs, address=ray_address)
aana_app.connect(
port=port,
host=host,
show_logs=show_logs,
address=ray_address,
dashboard_address=ray_dashboard_address,
dashboard_port=ray_dashboard_port,
)
with contextlib.suppress(
DeploymentException
): # we have a nice error message for this
Expand Down

0 comments on commit ed8a4dc

Please sign in to comment.