From 952bc8035db862408c6998d69269fdad2862121c Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Sun, 19 Nov 2023 22:21:32 +0000 Subject: [PATCH] Fix activate and multiple nodes --- sky/provision/instance_setup.py | 3 ++- sky/skylet/constants.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sky/provision/instance_setup.py b/sky/provision/instance_setup.py index 311efc6f48d..9f25be2d1c8 100644 --- a/sky/provision/instance_setup.py +++ b/sky/provision/instance_setup.py @@ -272,7 +272,7 @@ def start_ray_on_worker_nodes(cluster_name: str, no_restart: bool, # Unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY, see the comment in # `start_ray_on_head_node`. cmd = (f'unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY; ' - 'RAY_SCHEDULER_EVENTS=0 RAY_DEDUP_LOGS=0 ' + 'export RAY_SCHEDULER_EVENTS=0 RAY_DEDUP_LOGS=0; ' f'ray start --disable-usage-stats {ray_options} || exit 1;' + _RAY_PRLIMIT + _DUMP_RAY_PORTS) if no_restart: @@ -286,6 +286,7 @@ def start_ray_on_worker_nodes(cluster_name: str, no_restart: bool, f'{{ {cmd}; }}') else: cmd = 'ray stop; ' + cmd + cmd = constants.ACTIVATE_PYTHON_ENV + cmd logger.info(f'Running command on worker nodes: {cmd}') diff --git a/sky/skylet/constants.py b/sky/skylet/constants.py index 572512951e5..e5301d0e7e4 100644 --- a/sky/skylet/constants.py +++ b/sky/skylet/constants.py @@ -67,7 +67,7 @@ } ACTIVATE_PYTHON_ENV = (f'[ -d {SKY_REMOTE_PYTHON_ENV} ] && ' - f'source {SKY_REMOTE_PYTHON_ENV}/bin/active;') + f'source {SKY_REMOTE_PYTHON_ENV}/bin/activate;') def run_in_python_env(command):