I'm building a container with BentoML in GitHub Ac...
# ask-for-help
p
I'm building a container with BentoML in GitHub Actions. Is there some information on how to setup workflow to use GHA cache for the uv cache in the container. I'm already using
--opt cache-from=type=gha --opt cache-to=type=gha,mode=max
, but this use the cache for the Docker layers, not uv dependencies. Whenever a small dependencies changes, it still has to rebuild numpy and scikit-learn.
The command in the build container is
RUN --mount=type=cache,target=/root/.cache/ uv pip install -r ./env/python/requirements.txt
so I assume I should find a way to put my uv cache in
/root/.cache/uv
.
a
Well
—opt
is for buildkit options here. It should be cached afaik
p
As I said, the container layers are cached. What I'm looking for is to cache the python packages, so when (re)building a layer, let's say when a new python dependencies is added, there is no need to rebuild other python dependencies such as numpy and scikit-learn