I imaging debian is also super expensive, and so scaling that must not be easy. Every decision could be thousands of dollars.
1. Proxy inside the company network that intercepts every request to pypi? Doesn't work well due to https, I guess.
2. Replacing pypi in your project description with your own mirror? Might work, but at least slows down every build outside of your network. Also needs to be replicated for npm, cargo, maven, docker, ...
3. Start a userspace wrapper before starting the build that transparently redirects every request. That would be the best solution, IMO. But how do I intercept https requests of child processes? Technically, it must be possible, but is there such a tool?
pip can be configured to use a local warehouse, and there are warehouses that transparently proxy to pypi, but caches any previously fetched result. E.G: https://pypi.org/project/proxypypi/
Since you control it, and it's read only from the outside, you can actually expose it even outside of your network.
But indeed, it must be replicated for npm, cargo, maven, docker...
There is a startup idea here :)
All these frameworks come with a tool to run an internal repo/mirror.
There are also commercial offerings (like artifactory) that cover all these languages in a single tool.
For python, just set PIP_INDEX in the CI environment to point to the internal mirror and it will be used automatically. It's very easy.
By default the downloaded wheels are cached in ~/cache/somewhere. Isolated builds don't benefit from it if they start with a fresh filesystem on every run, consider mounting a writable directory to use as cache, the speedup is more than worth it.
Even if such a system isn't built, with that kind of money on the table you could get a team of FANG scale developers to build it for you.
I think there needs to be a redesign in how dependencies work in most programming languages. Deterministic builds have been such a game changer and I think that CPU vs bandwidth may be the next big area to explore when it comes to compiling code.
But it's OK to accept donations in hardware or money as long as there are no strings attached.