From 9b01155e3ca2626e6ca7416fbf857bcd92a8ad39 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Sat, 6 Jun 2020 21:56:53 +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: OPTFRA-774 Signed-off-by: Pratik Raj Change-Id: I40d9eb94ecea623a9ed54b50b1786b154788a17b --- docs/sections/installation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/sections/installation.rst b/docs/sections/installation.rst index df7a4c2..c116b8b 100644 --- a/docs/sections/installation.rst +++ b/docs/sections/installation.rst @@ -223,9 +223,9 @@ Once the configuration is in place, installation is simple: .. code:: bash - $ pip install of-has + $ pip install --no-cache-dir of-has -To upgrade or downgrade, simply re-run ``pip install`` using the +To upgrade or downgrade, simply re-run ``pip install --no-cache-dir`` using the appropriate ``pip`` command line options. **NOTE**: Be sure proxy settings are in place if they're required to @@ -251,14 +251,14 @@ directory: Receiving objects: 100% (2291/2291), 477.59 KiB | 0 bytes/s, done. Resolving deltas: 100% (1422/1422), done. $ cd conductor - $ pip install . + $ pip install --no-cache-dir . The latest source can be pulled from ONAP at any time and reinstalled: .. code:: bash $ git pull - $ pip install . + $ pip install --no-cache-dir . Verifying Installation ~~~~~~~~~~~~~~~~~~~~~~ -- cgit 1.2.3-korg