Use github installation for dockerfile from dev version#20740
Use github installation for dockerfile from dev version#20740TomeHirata merged 5 commits intomlflow:masterfrom
Conversation
… setup This update includes the addition of 'RUN pip install virtualenv' to multiple Dockerfiles to ensure that the virtualenv package is installed, facilitating better environment management across different setups. Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
There was a problem hiding this comment.
Pull request overview
This PR aims to unblock Docker image builds for MLflow’s virtualenv-based images by ensuring virtualenv is installed during image build, aligning the generated Dockerfile template and test Dockerfile fixtures.
Changes:
- Add
RUN pip install virtualenvto multiple Dockerfile fixtures used in tests. - Add
RUN pip install virtualenvto the Ubuntu/pyenv setup snippet inmlflow/models/docker_utils.pyso generated Dockerfiles include it.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/resources/dockerfile/Dockerfile_sagemaker_virtualenv_no_java | Installs virtualenv in the fixture image build steps. |
| tests/resources/dockerfile/Dockerfile_sagemaker_virtualenv | Installs virtualenv in the fixture image build steps. |
| tests/resources/dockerfile/Dockerfile_no_model_uri | Installs virtualenv in the fixture image build steps. |
| tests/resources/dockerfile/Dockerfile_java_flavor | Installs virtualenv in the fixture image build steps. |
| tests/resources/dockerfile/Dockerfile_install_mlflow_virtualenv | Installs virtualenv in the fixture image build steps. |
| mlflow/models/docker_utils.py | Ensures generated Ubuntu-based Dockerfiles install virtualenv. |
tests/resources/dockerfile/Dockerfile_sagemaker_virtualenv_no_java
Outdated
Show resolved
Hide resolved
tests/resources/dockerfile/Dockerfile_install_mlflow_virtualenv
Outdated
Show resolved
Hide resolved
|
Documentation preview for 35af770 is available at: More info
|
There was a problem hiding this comment.
Let's fix the root cause. The same issue happens again if we remove a dependency again. We can consider installing dev mlflow in Dockerfile in CI or while testing.
There was a problem hiding this comment.
The same issue happens again if we remove a dependency again We can consider installing dev mlflow in Dockerfile in CI or while testing
Is it a test-only issue? Doesn't it happen when users create a Dockerfile using the dev version? We could install dev MLFlow if the dev version is used then (not only for CI or testing), but not sure if that's also an ideal behavior.
There was a problem hiding this comment.
Good question. MLflow version used in dockerfile is defined here:
mlflow/mlflow/models/docker_utils.py
Line 190 in 8948d54
In >= 3.10, mlflow no longer requires virtualenv
In < 3.10, they have pip install virtualenv
I wonder if VERSION becomes < 3.10. Let's double check
There was a problem hiding this comment.
Actually the dev version was used when generate-dockerfile command is called for the dev version, so the feature didn't work. I think installing the dev version from github is probably the expected behavior, wdyt?
Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
…lflow#20740) Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
…20740) Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
Related Issues/PRs
https://github.com/mlflow/dev/actions/runs/21907088804/job/63250153366
What changes are proposed in this pull request?
2a3b04fc7 removed virtualenv from the dockerfile, but the latest released version still requires it.
How is this PR tested?
Does this PR require documentation update?
Does this PR require updating the MLflow Skills repository?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.