uv icon indicating copy to clipboard operation
uv copied to clipboard

uv cache populate / export cache

Open adriangb opened this issue 1 year ago • 3 comments

It would be nice to have the ability to pre-cache dependencies. In particular I would find this useful in a monorepo context to:

  1. Have a docker layer where I populate the cache with all dependencies.
  2. In another service specific layer I do a --cache-from or similar from this cache layer and tell uv to use the cache that was built in that layer.

This is important because if I have services with the following deps:

tensorflow
some-small-package

And

tensorflow
some-other-small-package

If I don't have a "common" step where I download tensorflow I'd end up downloading it twice (once for each service) which is wasteful. Yes you can parallelize it but IMO efficient serial >> inefficient parallel.

Alternatively something like https://github.com/python-poetry/poetry/issues/5983 and functionality in uv to populate that folder of wheels could do the trick.

adriangb avatar Aug 21 '24 12:08 adriangb