Skip to content

Commit

Permalink
Updates docs to clarify relative path evaluation for workdir (#3269)
Browse files Browse the repository at this point in the history
* Updates docs to clarify relative path evaluation for workdir

* more notes

---------

Co-authored-by: Romil Bhardwaj <[email protected]>
  • Loading branch information
mjkanji and romilbhardwaj authored Mar 4, 2024
1 parent 9d5232b commit 14080a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/examples/syncing-code-artifacts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ pass the ``--no-setup`` flag to ``sky launch``. For example, ``sky launch --no-s
under a local file_mount source are also ignored (the same behavior as
handling ``workdir``).

.. note::

If relative paths are used in :code:`file_mounts` or :code:`workdir`, they
are evaluated relative to the location from which the :code:`sky` command
is run.

.. _uploading-or-reusing-large-files:

Uploading or reusing large files
Expand Down
6 changes: 6 additions & 0 deletions docs/source/reference/yaml-spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Available fields:
#
# Commands in "setup" and "run" will be executed under it.
#
# If a relative path is used, it's evaluated relative to the location from
# which `sky` is called.
#
# If a .gitignore file (or a .git/info/exclude file) exists in the working
# directory, files and directories listed in it will be excluded from syncing.
workdir: ~/my-task-code
Expand Down Expand Up @@ -252,6 +255,9 @@ Available fields:
file_mounts:
# Uses rsync to sync local files/directories to all nodes of the cluster.
#
# If a relative path is used, it's evaluated relative to the location from
# which `sky` is called.
#
# If symlinks are present, they are copied as symlinks, and their targets
# must also be synced using file_mounts to ensure correctness.
/remote/dir1/file: /local/dir1/file
Expand Down

0 comments on commit 14080a0

Please sign in to comment.