Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions content/docs/command-reference/cache/dir.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Helper to set the `cache.dir` configuration option. (See
[cache directory](/doc/user-guide/dvc-files-and-directories#structure-of-cache-directory).)
Unlike doing so with `dvc config cache`, this command transform paths (`value`)
that are provided relative to the current working directory into paths
**relative to the config file location**. They are required in the latter form
for the config file.
**relative to the config file location** of your own project. They are required
in the latter form for the config file.

## Options

Expand Down Expand Up @@ -50,17 +50,18 @@ for the config file.
## Example: Using relative path

```dvc
$ dvc cache dir ../dir
$ cat .dvc/config
$ dvc cache dir ../dir $ cat .dvc/config
...
[cache]
dir = ../../dir
[cache] dir = ../../dir
...
```

`../dir` has been resolved relative to the `.dvc/` dir, resulting in
`../../dir`.

Thecommand `dvc cache dir` resolves your relative paths so that they work with
the location of the config file in your project.

## Example: Using absolute path

```dvc
Expand All @@ -72,4 +73,7 @@ $ cat .dvc/config
...
```

Absolute path `/path/to/dir` saved as is.
As compared to the `dvc config cache.dir` command, this is a higher level
command which is specific to a set of use cases. To know more about usage of
`dvc config cache` refer to the [cache](/doc/command-reference/config#cache)
section in the `config` docs.
5 changes: 3 additions & 2 deletions content/docs/use-cases/shared-development-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Tell DVC to use the directory we've set up above as the <abbr>cache</abbr> for
your <abbr>project</abbr>:

```dvc
$ dvc config cache.dir /home/shared/dvc-cache
$ dvc cache dir /home/shared/dvc-cache
```

And tell DVC to set group permissions on newly created or downloaded cache
Expand All @@ -62,7 +62,8 @@ files:
$ dvc config cache.shared group
```

> See `dvc config cache` for more information on these config options.
> See `dvc config cache` and `dvc cache dir` for more information on these
> config options.

If you're using Git, commit changes to your project's config file (`.dvc/config`
by default):
Expand Down