Dockerfile: retain the pip download cache between builds (#6035)
This speeds up the build when the entire step can't be cached (e.g. the requirements file changed), but the package list remains mostly the same. The savings are... rather underwhelming, actually. I have observed about a minute in savings, although it obviously depends on the network connection speed. I think this is because pip is inefficient at loading from its own cache (I have observed it loading the entire cached file into memory, for example). Still, savings are savings, and we're getting them basically for free, so why not. Note that I only persist the HTTP cache, and not the wheel cache. That's because any wheels that pip builds could depend on the system packages, and I don't want old wheels to be reused if the system packages change. Also, disable the pip autoupdate checks, which isn't much of an optimization, but it gets rid of some pointless warnings.
Showing
想要评论请 注册 或 登录