Improve execution of pip during container building#713
Open
ssbarnea wants to merge 1 commit intoansible:develfrom
Open
Improve execution of pip during container building#713ssbarnea wants to merge 1 commit intoansible:develfrom
ssbarnea wants to merge 1 commit intoansible:develfrom
Conversation
0fc0278 to
9822112
Compare
- Make pip less verbose as this makes harder to investigate container building due to being too verbose. - Use a bind mount to prevent pip cache from being written inside the container but still make use of it. This will speed-up the build process considerably.
9822112 to
8e5c00b
Compare
|
Shrews
requested changes
Dec 5, 2024
| if self.definition.ansible_ref_install_list: | ||
| self.steps.append('RUN $PYCMD -m pip install --no-cache-dir $ANSIBLE_INSTALL_REFS') | ||
| self.steps.append( | ||
| 'RUN --mount=type=cache,dst=/root/.cache/pip $PYCMD -m pip install -q $ANSIBLE_INSTALL_REFS') |
Contributor
There was a problem hiding this comment.
Using -q hides some install info that could be useful in debugging user issues. I'd prefer to not use this.
I did notice that it did subtract about 1.5 seconds on a very simple build, and the resulting image sizes did not seem to change by any significant amount.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



building due to being too verbose.
container but still make use of it. This will speed-up the build
process considerably.