-
Notifications
You must be signed in to change notification settings - Fork 7k
[release auto] add uv and default python in forge #58874
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
Conversation
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.
Code Review
This pull request introduces uv for Python environment management in the forge Dockerfiles and standardizes curl command options. The changes are generally good, especially the move to curl -fsSL for more robust scripting.
I've left a few comments regarding minor inconsistencies and potential improvements:
- There's a mismatch between comments and code regarding the Python version being installed.
- An unnecessary
exportcommand can be removed for better clarity. - There is an inconsistent
pipversion pinned in one of the Dockerfiles.
Addressing these points will improve the maintainability and consistency of the Docker setup.
| curl -fsSL https://astral.sh/uv/install.sh | sudo env UV_UNMANAGED_INSTALL="/usr/local/bin" sh | ||
|
|
||
| mkdir -p /usr/local/python | ||
| # Install Python 3.9 using uv |
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.
| UV_PYTHON_VERSION=3.10 | ||
| uv python install --install-dir /usr/local/python "$UV_PYTHON_VERSION" | ||
|
|
||
| export UV_PYTHON_INSTALL_DIR=/usr/local/python |
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.
| curl -fsSL https://astral.sh/uv/install.sh | sudo env UV_UNMANAGED_INSTALL="/usr/local/bin" sh | ||
|
|
||
| mkdir -p /usr/local/python | ||
| # Install Python 3.9 using uv |
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.
| UV_PYTHON_VERSION=3.10 | ||
| uv python install --install-dir /usr/local/python "$UV_PYTHON_VERSION" | ||
|
|
||
| export UV_PYTHON_INSTALL_DIR=/usr/local/python |
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.
ci/docker/forge.Dockerfile
Outdated
| curl -fsSL https://astral.sh/uv/install.sh | sudo env UV_UNMANAGED_INSTALL="/usr/local/bin" sh | ||
|
|
||
| mkdir -p /usr/local/python | ||
| # Install Python 3.9 using uv |
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.
d38ddf7 to
a23be58
Compare
also uses `curl -fsSL` as much as possible, and removes unnecessary sudos Signed-off-by: Lonnie Liu <[email protected]>
a23be58 to
773396f
Compare
|
|
||
| # As a convention, we pin all python packages to a specific version. This | ||
| # is to to make sure we can control version upgrades through code changes. | ||
| uv pip install --system pip==25.2 cffi==1.16.0 |
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.
Bug: Inconsistent pip versions across forge Docker images
The new forge images install pip==25.2, while ci/docker/forge.Dockerfile uses pip==25.0. The comment explicitly states packages are pinned "to make sure we can control version upgrades through code changes", but this version mismatch across forge images creates inconsistent environments that could lead to different build behaviors between ARM64, x86_64, and the main forge image.
also uses `curl -fsSL` as much as possible otherwise the release blocker checker is not working. also removes unnecessary sudos. Signed-off-by: Lonnie Liu <[email protected]>
also uses `curl -fsSL` as much as possible otherwise the release blocker checker is not working. also removes unnecessary sudos. Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: YK <[email protected]>
also uses `curl -fsSL` as much as possible otherwise the release blocker checker is not working. also removes unnecessary sudos. Signed-off-by: Lonnie Liu <[email protected]>
also uses
curl -fsSLas much as possibleotherwise the release blocker checker is not working.
also removes unnecessary sudos.