Skip to content

Migrate from pip to uv#670

Closed
naveenkul wants to merge 3 commits intodevfrom
migrate-to-uv
Closed

Migrate from pip to uv#670
naveenkul wants to merge 3 commits intodevfrom
migrate-to-uv

Conversation

@naveenkul
Copy link

Installation time with pip: ~4m 02s
Installation time with uv: ~2m 30s

1.6x speedup

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Comment on lines -1 to -5
opencv-python
python-dotenv
openai
anthropic>=0.19.0
cerebras-cloud-sdk

Choose a reason for hiding this comment

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

P1 Badge Deleting requirements.txt breaks Docker builds

The commit removes the root requirements.txt, but many Dockerfiles (e.g. docker/deprecated/agent/Dockerfile and several others under docker/deprecated/*) still execute COPY requirements.txt followed by pip install -r requirements.txt. Any docker build that relies on those files now fails immediately because the referenced file no longer exists. Either restore the file or migrate those Dockerfiles to the new uv workflow before deleting it.

Useful? React with 👍 / 👎.

Copy link
Author

Choose a reason for hiding this comment

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

👍

"soundfile",

# PyTorch (version constraints from base-requirements.txt)
"torch==2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

No we cannot lock torch versions

Copy link
Author

Choose a reason for hiding this comment

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

following the same constraint as the requirements file.

torch==2.0.1
what's the best course of action here? I see a lot of dependencies in dev branch with version locks.

Tested on Ubuntu 22.04/24.04

```bash
sudo apt install python3-venv
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this removed

Copy link
Author

Choose a reason for hiding this comment

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

redundant. uv venv --python 3.10 replaces it.

pip install -e .[cpu,dev]
# Install dependencies
# CPU only (recommended to attempt first)
uv sync --extra dev --extra cpu
Copy link
Contributor

Choose a reason for hiding this comment

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

Idk this syntax i usually do uv pip install -e .[cpu] maybe its the same

Copy link
Author

Choose a reason for hiding this comment

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

uv sync and uv add are more native options from uv. uv sync installs only the subset of dependencies that are missing or have changed, making it faster than checking everything like pip install does.

uv pip install will install the packages in global env if local isn't activated, uv sync needs opt-in. given how specific some dependencies are, we wouldn't want to mess with the system level dependencies accidentally

@spomichter
Copy link
Contributor

Deprecated docker dir is deprecated and should just be deleted

@paul-nechifor
Copy link
Contributor

Superseded by #870

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