You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Speed up CircleCI jobs by replacing pip with uv pip - #5255
Creating Pyodide pull requests often requires several commits to get things working correctly and all tests passing. Unfortunately, there are numerous, long test runs on GitHub Actions and CircleCI so waiting for feedback can slow innovation. Pip installing numerous, large dependencies seems to be a substantial portion of the time required to run all these CI jobs.
Could some CI jobs be substantially accelerated using uv pip instead of pip?
https://docs.astral.sh/uv -- `10-100x faster than pip` sounds like a useful improvement to me.
https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md
If there is interest in trying this and a maintainer can recommend one CI job to start with, I would like to create a proof-of-concept pull request to benchmark the performance improvement of using uv for that job.
@dhruvmanila Any advice on how to avoid repeated source .venv/bin/activate calls inside complex CircleCI jobs? docs.astral.sh/uv does not yet mention CircleCI.
I've personally found some troubles with using the uv action on GHA without having a virtual environment set: astral-sh/setup-uv#124. A workaround is to set the PATH to the venv folder so that later jobs can make use of it.
Thanks for your assistance @dhruvmanila. I believe each CircleCI job step is a new invocation of bash so source .venv/bin/activate seems to be required in each job step that will touch the Python dependencies. Perhaps #5255 will help by installing uv and its venv from the start in Dockerfile.
cclauss
changed the title
Speed up CI jobs by replacing pip with uv pip
Speed up CircleCI jobs by replacing pip with uv pip
Dec 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT: Highly experimental!!
Description
Fixes #5228
Creating Pyodide pull requests often requires several commits to get things working correctly and all tests passing. Unfortunately, there are numerous, long test runs on GitHub Actions and CircleCI so waiting for feedback can slow innovation. Pip installing numerous, large dependencies seems to be a substantial portion of the time required to run all these CI jobs.
Could some CI jobs be substantially accelerated using uv pip instead of pip?
If there is interest in trying this and a maintainer can recommend one CI job to start with, I would like to create a proof-of-concept pull request to benchmark the performance improvement of using uv for that job.
Related to:
#5018 (comment)
#5004 (comment)
Let's start just with the instances of
pip installin one file:.circleci/config.yml@dhruvmanila Any advice on how to avoid repeated
source .venv/bin/activatecalls inside complex CircleCI jobs? https://docs.astral.sh/uv does not yet mention CircleCI.Checklists