diff options
author | Pratik Raj <rajpratik71@gmail.com> | 2020-06-06 21:59:50 +0530 |
---|---|---|
committer | Pratik Raj <rajpratik71@gmail.com> | 2020-06-06 21:59:50 +0530 |
commit | 9dc682d7bff7da09bc49838dc0d8d38c6d76c2dd (patch) | |
tree | db740e1b4a5c06d0210e0ec0563ad96fcd769afc /mvn-phase-lib.sh | |
parent | 47e2053949bf4a490733fbe1ae2dfc5d65436c1d (diff) |
optimize size and time using "--no-cache-dir"
Using "--no-cache-dir" flag in pip install ,make sure dowloaded packages
by pip don't cached on system . This is a best practise which make sure
to fetch ftom repo instead of using local cached one . Further , in case
of Docker Containers , by restricing 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
Issue-ID: DCAEGEN2-2294
Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
Change-Id: Ifeda4876507f89279c550e15ec76508277098ca6
Diffstat (limited to 'mvn-phase-lib.sh')
-rwxr-xr-x | mvn-phase-lib.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mvn-phase-lib.sh b/mvn-phase-lib.sh index 66d5bbc0..4f0c304c 100755 --- a/mvn-phase-lib.sh +++ b/mvn-phase-lib.sh @@ -176,8 +176,8 @@ run_tox_test() rm -rf ./venv-tox ./.tox virtualenv ./venv-tox source ./venv-tox/bin/activate - pip install --upgrade pip - pip install --upgrade tox argparse + pip install --no-cache-dir --upgrade pip + pip install --no-cache-dir --upgrade tox argparse pip freeze tox deactivate @@ -199,8 +199,8 @@ build_wagons() virtualenv ./venv-pkg source ./venv-pkg/bin/activate - pip install --upgrade pip - pip install wagon + pip install --no-cache-dir --upgrade pip + pip install --no-cache-dir wagon wagon create --format tar.gz "$PLUGIN_DIR" deactivate rm -rf venv-pkg |