-
Notifications
You must be signed in to change notification settings - Fork 83
RHOAIENG-21690: chore(Dockerfiles): augument micropipenv
with uv
for faster package installs
#968
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fb58ec0
to
44b61c4
Compare
44b61c4
to
cbe3261
Compare
cbe3261
to
dee6d41
Compare
dee6d41
to
c3456a1
Compare
micropipenv
with uv
for faster package installs
/retest jupyter-minimal-ubi9-python-3-11-on-pull-request |
c3456a1
to
825dabd
Compare
825dabd
to
b6e1f01
Compare
…faster package installs ``` × No solution found when resolving dependencies: ╰─▶ Because there is no version of certifi==2025.1.31 and you require certifi==2025.1.31, we can conclude that your requirements are unsatisfiable. hint: `certifi` was found on https://download.pytorch.org/whl/cu121, but not at the requested version (certifi==2025.1.31). A compatible version may be available on a subsequent index (e.g., https://pypi.org/simple). By default, uv will only consider versions that are published on the first index that contains a given package, to avoid dependency confusion attacks. If all indexes are equally trusted, use `--index-strategy unsafe-best-match` to consider all versions from all indexes, regardless of the order in which they were defined. ``` When installing as `USER 1001` in /opt/app-root ``` Using Python 3.11.9 environment at: /opt/app-root error: Permission denied (os error 13) at path "/opt/app-root/.tmpQEqqyQ" ``` believe we should _not_ enable https://docs.astral.sh/uv/reference/settings/#compile-bytecode astral-sh/uv#6493 ``` UV_COMPILE_BYTECODE=1 --compile-bytecode ``` uv has bug installing tensorflow astral-sh/uv#12092
b6e1f01
to
c025d67
Compare
otherwise lgtm |
/lgtm the failed CI looks like an ugly infra issue... |
Thanks, I'll think what to do about this. Hopefully somebody else likes this too. Next step could be to leave out micropipenv completely and use the requirements.txt we already have generated in the git repo for every image. |
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.
Amazing initative
As this is bring in core change to workbench image
holding for sometime to get time to review this.
/hold
@jiridanek: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
upon rerun, the openshift CI shows real issues, |
I've discussed with Jan and I've talked myself out of wanting to do this. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
https://issues.redhat.com/browse/RHOAIENG-21690
This change depends upon
/opt/app-root
ownership and permissions change caused by a DockerfileCOPY
#986Description
In our Dockerfile builds, micropipenv is used to read Pipfile.lock and run pip install to install everything in there.
it works by first creating a temporary requirement.txt with hashes, and then it runs pip install -r to install from that generated file
In enhancement
we added generating requirements.txt with hashes and committing them into our repository directly. That means we now can install from the requirements.txt without needing micropipenv. Turns out that uv is very fast requirements.txt installer that can be a drop-in replacement https://astral.sh/blog/uv
How Has This Been Tested?
This change still keeps micropipenv around, it uses it to generate requirements.txt, and then it uses uv to install the requirements.
Checking the install logs, it still prints the desirable warning
Merge criteria: