From 9dc682d7bff7da09bc49838dc0d8d38c6d76c2dd Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Sat, 6 Jun 2020 21:59:50 +0530 Subject: 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 Change-Id: Ifeda4876507f89279c550e15ec76508277098ca6 --- mvn-phase-script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mvn-phase-script.sh') diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index 6bc987f6..ebb609f0 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -75,8 +75,8 @@ deploy) CURDIR=$(pwd) virtualenv ./venv-doc source ./venv-doc/bin/activate - pip install --upgrade pip - pip install --upgrade 'mkdocs==0.16.3' mkdocs-material + pip install --no-cache-dir --upgrade pip + pip install --no-cache-dir --upgrade 'mkdocs==0.16.3' mkdocs-material pip freeze mkdocs build -- cgit 1.2.3-korg