Avoid use of cache directory with pip. Use
pip install --no-cache-dir <package>
50 vim-common gasket-dkms
51
52# Install Required Python Packages and link python3 executable to python.
53RUN ln -s /usr/bin/python3 /usr/bin/python && \ 54 python -m pip install numpy opencv-python pyopengl
55
56# Set Timezone
Description
Once a package is installed, it does not need to be re-installed and the Docker cache can be leveraged instead. Since the pip cache makes the images larger and is not needed, it's better to disable it.
Bad Practice
RUN pip3 install foobar
Recommended
RUN pip3 install --no-cache-dir foobar