-
Notifications
You must be signed in to change notification settings - Fork 481
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
Allow exporting cache mounts for use in CI systems. #244
Comments
You can use a separate stage to export/import data into cache mounts. Not sure if this will improve the performance of the builds as regenerating cache mounts is usually faster than import/export. Eg.
|
@tonistiigi thanks for the reply, but I can't see from your example how i would:
Am i misunderstanding you? |
You can use |
thanks @tonistiigi i'll give this a go. Cheers! |
Could someone expand on using |
I don't understand this statement. A big |
True, but why not rely on 'normal' docker layer caching in combination with cache-from ? Also, what will you cache with a compilation? intermediate library files? |
It's the situation where you add a single python/r package and the entire
docker layer needs to be rebuilt. And one layer per package isn't feasible
(too many separate install statements in the dockerfile).
…On Tue, May 25, 2021 at 9:35 AM Hans van den Bogert < ***@***.***> wrote:
I don't understand this statement. A big apt install or compiling a lot of
packages from source can take anywhere from minutes to hours. Having a
cache in such a case is extremely practical.
True, but why not rely on 'normal' docker layer caching in combination
with cache-from ? Also, what will you cache with a compilation?
intermediate library files?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#244 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAWOUQEYU5FQCMONRLRRZTTPOYRZANCNFSM4LSAUOWQ>
.
|
It's even worse than that, actually: even if you want to break every single pacakge into its own layer with its own install statement in the Dockerfile, that doesn't actually solve the problem because layers are ordered, so if the first package you listed gets updated, it still invalidates the cache for all subsequent packages. |
Hi,
Various CI systems are the ability to cache and restore files/directories between builds.
It would be very to be able to export
type=cache
mounts, which could then be saved and restored between CI runs, allowing for faster builds.Thanks!
The text was updated successfully, but these errors were encountered: