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 in backend container #8605

Merged
merged 47 commits into from May 15, 2024
Merged

Use uv in backend container #8605

merged 47 commits into from May 15, 2024

Conversation

yashgorana
Copy link
Contributor

@yashgorana yashgorana commented Mar 20, 2024

Description

  • Use uv as package manager
  • Cleaned up dockerfile & dockerignores

Affected Dependencies

List any dependencies that are required for this change.

How has this been tested?

  • Describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • List any relevant details for your test configuration.

Checklist

@yashgorana
Copy link
Contributor Author

Haven't tested this rigorously so please don't merge

@yashgorana yashgorana changed the title Use uv in backend container [DO NOT MERGE] Use uv in backend container Mar 20, 2024
@yashgorana yashgorana marked this pull request as draft March 20, 2024 21:17
@yashgorana yashgorana changed the title [DO NOT MERGE] Use uv in backend container Use uv in backend container Mar 20, 2024
@@ -886,7 +886,8 @@ commands =
bash -c 'k3d --version'

; create registry
bash -c 'k3d registry create registry.localhost --port 5800 -v $HOME/.k3d-registry:/var/lib/registry || true'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

local path $HOME/.k3d-registry gets mounted on the docker macos VM through virtiofs. Might be a reason why docker push gets stuck at some point. For now just use docker-native volume to make sure there's no virtiofs involved happening during a push.

ENV UV_HTTP_TIMEOUT=600

# keep static deps separate to have each layer cached independently
# if amd64 then we need to append +cpu to the torch version
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish PyTorch would fix this somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that --index-url for cpu installs is annoying because setup.cfg doesn't support it - else things would've been easier.

Plus uv also has this issue with +cpu monikers at the moment. I've mentioned it here - astral-sh/uv#1497 (comment) & they're looking into it astral-sh/uv#3437.

@rasswanth-s
Copy link
Collaborator

Great work , I tested the builds

on DEV branch without Cache:
Took 211 s

on this branch without Cache:
took 115 s

Screenshot 2024-05-14 at 12 56 38 PM That's a 2x a speed up great work

mcqueen

Copy link
Collaborator

@rasswanth-s rasswanth-s left a comment

Choose a reason for hiding this comment

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

Excellent work @yashgorana

@yashgorana yashgorana enabled auto-merge May 15, 2024 10:33
@yashgorana yashgorana merged commit d7a053a into dev May 15, 2024
29 checks passed
@yashgorana yashgorana deleted the yash/backend-uv branch May 15, 2024 10:50
@yashgorana yashgorana mentioned this pull request May 15, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants