openpilot
openpilot copied to clipboard
Set-up-on-retry Openpilot on GHA runners (WIP)
For #30706.
Currently, caching the apt packages and dependencies on GHA runners chops off 10~15s on setup with retry on docs.yaml: 52s on setup 45s on setup However, it sometimes take the same amount as caching from ghrc within bounds of 5s. Most slow down is from extracting the tar and downloading the cache.
I have also tested with caching docker image with local and new experimental gha cache, but most of the time is from loading or pulling the image, and they are significantly slower (around 30s to 1 min)
Then the feasible good way to shorten this is to cut off the dependencies
The base Ubuntu 20.04 Docker image is only ~70MB, and our image is a few GB. I agree we've gotta cut down on the dependencies, but I suspect there's still a good amount we're wasting.
For example, are there any dependencies we need for building/installing all the Python dependencies that we can remove once it's all setup?
Any luck with slimming down the image?
I haven't worked on this lately. Last thing I tried was running estargz file format to see if it's faster but haven't deployed it onto GHA yet. About the image slimming, I think this problem would require me to understand alot about the dependencies and how they work in OP, and I'm new to OP so I think I would close this for now, and touch on it later once I'm more familiar with OP.
But yeah, like you said, some of the apt packages could be removed right after installing the python deps (curl, etc)