Skip to content
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

Extract apt cache for re-use in next build #316

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

robin-reckmann
Copy link
Contributor

@robin-reckmann robin-reckmann commented Aug 17, 2024

Downloading apt packages every time takes a considerable amount of time (This varies based on individual connection speeds). Here we extract the downloaded package indizes as well as the package cache itself and store it outside of the docker image in the ./cache directory. The build script is set up to reload this folder on the next build and re-use the package files. In CI the folder is mounted to the namespace cache volume for re-use in other runs.
Additionally apt workflows are updated so that only a single apt update in the beginning is executed and caches are reused throughout the build. This leads to a larger docker image size (due to multiple versions of the caches in the different layers), but has no influence on the final agnos image size.

@robin-reckmann robin-reckmann deleted the separate-apt-cache-2 branch August 21, 2024 04:26
@robin-reckmann robin-reckmann restored the separate-apt-cache-2 branch August 21, 2024 04:27
@robin-reckmann
Copy link
Contributor Author

Potential downside is that docker cache is busted more often due to changes from even other PRs to the cache. With the high download speeds in the CI this doesnt seem to be that beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant