Command Line Interface

Runhouse provides CLI commands for logging in/out, and for basic interaction with the cluster.

The commands can be run like follows:

$ runhouse login $ runhouse cluster ssh cluster_name
runhouse.main.cluster_down(cluster_name: str = <typer.models.ArgumentInfo object>, remove_configs: bool = <typer.models.OptionInfo object>, remove_all: bool = <typer.models.OptionInfo object>, force_deletion: bool = <typer.models.OptionInfo object>)[source]

Terminate cluster if it is not down. No-op if cluster is already down. This only applies to on-demand clusters, and has no effect on self-managed clusters.

Example

$ runhouse cluster down /sashab/rh-basic-cpu

runhouse.main.cluster_keep_warm(cluster_name: str = <typer.models.ArgumentInfo object>, mins: int | None = <typer.models.OptionInfo object>)[source]

Keep the cluster warm for given number of minutes after inactivity.

Example

$ runhouse cluster keep-warm /sashab/rh-basic-cpu

runhouse.main.cluster_list(show_all: bool = <typer.models.OptionInfo object>, since: str | None = <typer.models.OptionInfo object>, cluster_status: ~runhouse.resources.hardware.utils.ClustersListStatus | None = <typer.models.OptionInfo object>)[source]

Load Runhouse clusters

Examples

$ runhouse cluster list

$ runhouse cluster list --all

$ runhouse cluster list --status terminated

$ runhouse cluster list --since 15m

runhouse.main.cluster_logs(cluster_name: str = <typer.models.ArgumentInfo object>, since: ~runhouse.cli_utils.LogsSince | None = <typer.models.OptionInfo object>)[source]

Load the logs of the Runhouse server running on a cluster.

Examples

$ runhouse cluster logs /sashab/rh-basic-cpu

$ runhouse cluster logs /sashab/rh-basic-cpu --since 60

runhouse.main.cluster_ssh(cluster_name: str)[source]

SSH into a remote cluster.

Example

$ runhouse cluster ssh /sashab/rh-basic-cpu

runhouse.main.cluster_status(cluster_name: str = <typer.models.ArgumentInfo object>, send_to_den: bool = <typer.models.OptionInfo object>)[source]

Load the status of the cluster.

Example

$ runhouse cluster status /sashab/rh-basic-cpu

runhouse.main.cluster_up(cluster_name: str = <typer.models.ArgumentInfo object>)[source]

Bring up the cluster if it is not up. No-op if cluster is already up. This only applies to on-demand clusters, and has no effect on self-managed clusters.

Example

$ runhouse cluster up /sashab/rh-basic-cpu

runhouse.main.login(token: str | None = <typer.models.ArgumentInfo object>, sync_secrets: bool | None = <typer.models.OptionInfo object>, yes: bool | None = <typer.models.OptionInfo object>)[source]

Login to Runhouse. Validates token provided, with options to upload or download stored secrets or config between local environment and Runhouse / Vault.

runhouse.main.logout()[source]

Logout of Runhouse. Provides options to delete locally configured secrets and local Runhouse configs

runhouse.main.server_restart(cluster_name: str = <typer.models.OptionInfo object>, restart_ray: bool = <typer.models.OptionInfo object>, screen: bool = <typer.models.OptionInfo object>, nohup: bool = <typer.models.OptionInfo object>, resync_rh: bool = <typer.models.OptionInfo object>, host: str | None = <typer.models.OptionInfo object>, port: str | None = <typer.models.OptionInfo object>, use_https: bool = <typer.models.OptionInfo object>, use_den_auth: bool = <typer.models.OptionInfo object>, ssl_keyfile: str | None = <typer.models.OptionInfo object>, ssl_certfile: str | None = <typer.models.OptionInfo object>, restart_proxy: bool = <typer.models.OptionInfo object>, use_caddy: bool = <typer.models.OptionInfo object>, domain: str = <typer.models.OptionInfo object>, certs_address: str | None = <typer.models.OptionInfo object>, api_server_url: str = <typer.models.OptionInfo object>, default_env_name: str = <typer.models.OptionInfo object>, conda_env: str = <typer.models.OptionInfo object>, from_python: bool = <typer.models.OptionInfo object>)[source]

Restart the HTTP server on the cluster.

runhouse.main.server_start(cluster_name: str | None = <typer.models.OptionInfo object>, restart_ray: bool = <typer.models.OptionInfo object>, screen: bool = <typer.models.OptionInfo object>, nohup: bool = <typer.models.OptionInfo object>, resync_rh: bool = <typer.models.OptionInfo object>, host: str | None = <typer.models.OptionInfo object>, port: str | None = <typer.models.OptionInfo object>, use_https: bool = <typer.models.OptionInfo object>, use_den_auth: bool = <typer.models.OptionInfo object>, ssl_keyfile: str | None = <typer.models.OptionInfo object>, ssl_certfile: str | None = <typer.models.OptionInfo object>, restart_proxy: bool = <typer.models.OptionInfo object>, use_caddy: bool = <typer.models.OptionInfo object>, domain: str = <typer.models.OptionInfo object>, certs_address: str | None = <typer.models.OptionInfo object>, api_server_url: str = <typer.models.OptionInfo object>, default_env_name: str = <typer.models.OptionInfo object>, conda_env: str = <typer.models.OptionInfo object>, from_python: bool = <typer.models.OptionInfo object>)[source]

Start the HTTP server on the cluster.

runhouse.main.server_status(cluster_name: str = <typer.models.OptionInfo object>)[source]

Check the HTTP server status on the cluster.

runhouse.main.server_stop(cluster_name: str | None = <typer.models.OptionInfo object>, stop_ray: bool = <typer.models.OptionInfo object>, cleanup_actors: bool = <typer.models.OptionInfo object>)[source]

Stop the HTTP server on the cluster.