This repository was archived by the owner on Oct 30, 2023. It is now read-only.
use --no-cache-dir flag to pip in dockerfiles to save space#38
Open
rajpratik71 wants to merge 2 commits intosmart-edge-open:masterfrom
Open
use --no-cache-dir flag to pip in dockerfiles to save space#38rajpratik71 wants to merge 2 commits intosmart-edge-open:masterfrom
--no-cache-dir flag to pip in dockerfiles to save space#38rajpratik71 wants to merge 2 commits intosmart-edge-open:masterfrom
Conversation
abjyoti
reviewed
Apr 8, 2021
Contributor
abjyoti
left a comment
There was a problem hiding this comment.
Agree with change, as it is one time during container creation only.
abjyoti
previously approved these changes
Apr 8, 2021
Contributor
|
The build fails in CICD are due to older version of open-ness (20.12) used for build. The shell check errors reported there are resolved in openness 21.03 release. See if you can build this against 21.03 to overcome the CICD shell check errors blocking the merge. |
using "--no-cache-dir" flag in pip install ,make sure downloaded packages by pip don't cached on system . This is a best practice which make sure to fetch from repo instead of using local cached one . Further , in case of Docker Containers , by restricting caching , we can reduce image size. In term of stats , it depends upon the number of python packages multiplied by their respective size . e.g for heavy packages with a lot of dependencies it reduce a lot by don't caching pip packages. Further , more detail information can be found at https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6 Signed-off-by: Pratik raj <rajpratik71@gmail.com>
109953c to
4d819a1
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
using "--no-cache-dir" flag in pip install ,make sure downloaded packages
by pip don't cached on system . This is a best practice which make sure
to fetch from repo instead of using local cached one . Further , in case
of Docker Containers , by restricting caching , we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.
Further , more detail information can be found at
https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6
Signed-off-by: Pratik raj rajpratik71@gmail.com