Skip to content

Commit

Permalink
fix source bashrc for run
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed May 8, 2024
1 parent 7833f81 commit b53131e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3287,7 +3287,8 @@ def _exec_code_on_head(
returncode, stdout, stderr = self.run_on_head(handle,
job_submit_cmd,
stream_logs=False,
require_outputs=True)
require_outputs=True,
source_bashrc=True)

# Happens when someone calls `sky exec` but remote is outdated
# necessitating calling `sky launch`.
Expand Down Expand Up @@ -4233,6 +4234,9 @@ def run_on_head(
process_stream: Whether to post-process the stdout/stderr of the
command, such as replacing or skipping lines on the fly. If
enabled, lines are printed only when '\r' or '\n' is found.
source_bashrc: Whether to source bashrc when running on the command
on the VM. If it is a user-related commands, it would always be
good to source bashrc to make sure the env vars are set.
Returns:
returncode
Expand Down

0 comments on commit b53131e

Please sign in to comment.