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 --- conductor/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'conductor/tox.ini') diff --git a/conductor/tox.ini b/conductor/tox.ini index a6aa070..e358564 100644 --- a/conductor/tox.ini +++ b/conductor/tox.ini @@ -7,7 +7,7 @@ envlist = py3,pep8 basepython=python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -install_command = pip install -U {opts} {packages} +install_command = pip install --no-cache-dir -U {opts} {packages} usedevelop = True setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=conductor/tests/unit -- cgit 1.2.3-korg