Skip to content
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 instead of pip #14759

Closed
wants to merge 7 commits into from
Closed

Use uv instead of pip #14759

wants to merge 7 commits into from

Conversation

NickM-27
Copy link
Collaborator

@NickM-27 NickM-27 commented Nov 3, 2024

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code
  • Documentation Update

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • The code has been formatted using Ruff (ruff format frigate)

Copy link

netlify bot commented Nov 3, 2024

Deploy Preview for frigate-docs ready!

Name Link
🔨 Latest commit 9225d53
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/672a228e5894b70008c25177
😎 Deploy Preview https://deploy-preview-14759--frigate-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@NickM-27 NickM-27 force-pushed the uv branch 3 times, most recently from 63e16b8 to 5275032 Compare November 3, 2024 16:44
@NickM-27
Copy link
Collaborator Author

NickM-27 commented Nov 3, 2024

@felipecrs any ideas? Doesn't seem to be making things faster

@felipecrs
Copy link
Contributor

Maybe the key to get the speed bump is having the uv.lock file in git.

I have to dig deeper though, I'm not so experienced with this. It's just a guess.

@xconverge
Copy link
Contributor

xconverge commented Nov 3, 2024

Maybe the key to get the speed bump is having the uv.lock file in git.

I have to dig deeper though, I'm not so experienced with this. It's just a guess.

I had an absolutely massive speed increase with just switching from pip install -r requirements.txt to uv pip install -r requirements.txt on a project and CI pipeline, so the lock file is not essential to getting the bump. I am not familiar enough with this project so let me peek at the logs but there aren't too many knobs to turn.

Edit: I think until you can fully convert from pip, this is the best you can do. Nothing obvious sticks out and like I said, not many knobs to turn


# Build pysqlite3 from source
COPY docker/main/build_pysqlite3.sh /build_pysqlite3.sh
RUN /build_pysqlite3.sh

COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
# we still have to use pip to build wheel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are so many dependencies in requirements-wheels.txt, why is it necessary to use pip instead of uv pip here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agh I see, astral-sh/uv#1681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants