Skip to content

[CI/Build] vLLM cache directory for images #6444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 16, 2024
Merged

[CI/Build] vLLM cache directory for images #6444

merged 8 commits into from
Jul 16, 2024

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Jul 15, 2024

This PR adds a cache directory for vLLM. Similar to HuggingFace, the location of the cache is given by the environment variable VLLM_CACHE_ROOT, or $XDG_CACHE_HOME/vllm if it is not provided (e.g. ~/.cache/vllm by default). Under this directory, we have two subdirectories for containing different types of data:

  • VLLM_XLA_CACHE_PATH for XLA persistent cache directory. cc @WoosukKwon
  • VLLM_ASSETS_CACHE for downloaded assets.
    • This removes the need to use s3 or curl to download the images used in VLM examples and tests. cc @xwjiang2010

Accordingly, VLLM_CONFIG_ROOT has been updated to take the vllm directory into account. This means that:

  • The default has been changed from $XDG_CONFIG_HOME to $XDG_CONFIG_HOME/vllm.
  • Subpaths of VLLM_CONFIG_ROOT should no longer prepend vllm/ since that is included in the environment variable already.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only trigger fastcheck CI to run, which consists only a small and essential subset of tests to quickly catch errors with the flexibility to run extra individual tests on top (you can do this by unblocking test steps in the Buildkite run).

Full CI run is still required to merge this PR so once the PR is ready to go, please make sure to run it. If you need all test signals in between PR commits, you can trigger full CI as well.

To run full CI, you can do one of these:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 15, 2024
@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Jul 15, 2024

@WoosukKwon do you think we can move the XLA cache under ~/.cache/vllm as well?


def get_cache_dir():
"""Get the path to the cache for storing downloaded assets."""
path = Path(VLLM_ASSETS_CACHE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to expanduser here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already done in vllm.env so no need to do it again here.

Copy link
Contributor

@xwjiang2010 xwjiang2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a small comment.

@WoosukKwon
Copy link
Collaborator

WoosukKwon commented Jul 15, 2024

do you think we can move the XLA cache under ~/.cache/vllm as well?

@DarkLight1337 Yes. I think that's good for consistency.

@WoosukKwon
Copy link
Collaborator

BTW, we also have config-related cache under ~/.config/vllm/.

@DarkLight1337
Copy link
Member Author

BTW, we also have config-related cache under ~/.config/vllm/.

The only cache I found under that directory is gpu_p2p_access_cache_*. I have moved it under ~/.cache/vllm. cc @youkaichao

@youkaichao
Copy link
Member

LGTM

@simon-mo simon-mo merged commit d970115 into vllm-project:main Jul 16, 2024
71 of 73 checks passed
@DarkLight1337 DarkLight1337 deleted the image-assets branch July 16, 2024 06:14
fialhocoelho pushed a commit to opendatahub-io/vllm that referenced this pull request Jul 19, 2024
xjpang pushed a commit to xjpang/vllm that referenced this pull request Jul 24, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
LeiWang1999 pushed a commit to LeiWang1999/vllm-bitblas that referenced this pull request Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants