Skip to content

Commit

Permalink
fix storage file mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Nov 28, 2022
1 parent 38718cb commit 393a38b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions examples/managed_spot_with_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ run: |
echo hi >> /tmp/workdir/new_file
ls -al /tmp/workdir
cat ~/tmpfile
cat ~/a/b/c/tmpfile
3 changes: 1 addition & 2 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2975,8 +2975,7 @@ def _execute_file_mounts(self, handle: ResourceHandle,
sync = storage.make_sync_file_command(source=src,
destination=wrapped_dst)
# It is a file so make sure *its parent dir* exists.
mkdir_for_wrapped_dst = \
f'mkdir -p {os.path.dirname(wrapped_dst)}'
mkdir_for_wrapped_dst = (f'mkdir -p {os.path.dirname(wrapped_dst)}')

download_target_commands = [
# Ensure sync can write to wrapped_dst (e.g., '/data/').
Expand Down
3 changes: 1 addition & 2 deletions sky/cloud_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ def make_sync_dir_command(self, source: str, destination: str) -> str:

def make_sync_file_command(self, source: str, destination: str) -> str:
"""Downloads a file using AWS CLI."""
download_via_awscli = (f'mkdir -p {destination} &&'
f'aws s3 cp {source} {destination}')
download_via_awscli = f'aws s3 cp {source} {destination}'

all_commands = list(self._GET_AWSCLI)
all_commands.append(download_via_awscli)
Expand Down

0 comments on commit 393a38b

Please sign in to comment.