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

Use cache mounts instead of --clean? #357

Open
dholth opened this issue Mar 28, 2023 · 0 comments
Open

Use cache mounts instead of --clean? #357

dholth opened this issue Mar 28, 2023 · 0 comments

Comments

@dholth
Copy link

dholth commented Mar 28, 2023

Docker includes a cache mounts feature that removes the need to immediately clean conda/yum/etc. installs, accessed like

RUN --mount=type=cache,target=/root/.cache/pip \ pip install -U packages

The given path is preserved between docker invocations (maybe not in the cloud) and is not included in the image. It is only used on any individual RUN line that has the argument.

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

No branches or pull requests

1 participant