-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use uv as python package manager instead of poetry in docker #32530
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of locking is a bit annoying, but the speedup is likely worth it. Let's do this:
- remove
requirements.docker.txt
- just do
uv pip install .
in the Dockerfile (i.e. remove the install_python_dependencies.sh usage
Then, we can merge this, and I'll make a follow up to remove install_python_dependencies.sh
. We really shouldn't be changing people's pip versions or anything weird like that with our weird setup script.
Here's my follow up to this: #32541 |
The 7min time was from my memory playing with setup-retry last week, actual speed up building image with no cache in gha: |
Unfortunately, the locking has already become an issue. Our weekly lockfile CI job just ran, and a couple different things broke (#32550). It would've been bad if those just randomly broke on master instead of that PR. I'm closing it, but the bounty is yours since all the work was done. |
Description
Uses uv to install python dependencies instead of poetry if "uv" is passed into
install_python_dependencies.sh
.Uv's requirements.txt files are platform specific so this is just for the docker build as of now. Also, uv doesn't have dependencies groups like poetry for dev dependencies, so this installs all deps.
I can add requirements.txt files to support mac builds and only non-dev deps too if the bounty #32522 gets locked to me, but with this PR the CI speed up may be worth merging. Seeing setup-with-retry with no cache hits taking 4min from 7min.
Verification
Builds and passes tests in CI.