-
Notifications
You must be signed in to change notification settings - Fork 308
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
Adds python_exec into ImageSpec #3069
Adds python_exec into ImageSpec #3069
Conversation
Signed-off-by: Thomas J. Fan <[email protected]>
Code Review Agent Run #d07b90Actionable Suggestions - 4
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3069 +/- ##
==========================================
- Coverage 82.79% 76.85% -5.95%
==========================================
Files 3 205 +202
Lines 186 21602 +21416
Branches 0 2750 +2750
==========================================
+ Hits 154 16602 +16448
- Misses 32 4239 +4207
- Partials 0 761 +761 ☔ View full report in Codecov by Sentry. |
The greatexpectations failures are unrelated. |
Signed-off-by: Thomas J. Fan <[email protected]> Signed-off-by: lu00122 <[email protected]>
Why are the changes needed?
Currently,
ImageSpec
will always create a new virtualenv to install packages. With this PR, users can specify,python_exec
to use a Python from abase_image
's python to install packages into.What changes were proposed in this pull request?
This PR:
micromamba
python install into it's own function and only uses it ifpython_exec
is not set.envd
whenpython_exec
is set.conda_*
parameters are set andpython_exec
is set.How was this patch tested?
I ran the follow on sandbox:
And confirm that the image built uses system python.
Summary by Bito
This PR introduces a new ImageSpec feature allowing custom Python executable specification for package installation, replacing the default virtualenv approach. The implementation includes Micromamba installation logic refactoring, validation for conda-related parameters, and proper error handling in the envd builder. The changes are well-structured with comprehensive validation checks for python_exec paths.Unit tests added: True
Estimated effort to review (1-5, lower is better): 2