Skip to content

Commit

Permalink
Fix activate and multiple nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Nov 19, 2023
1 parent 5fb31e0 commit 952bc80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sky/provision/instance_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}')

Expand Down
2 changes: 1 addition & 1 deletion sky/skylet/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 952bc80

Please sign in to comment.