-
Notifications
You must be signed in to change notification settings - Fork 0
Added --allowed-hosts argument since it required in mlflow 3.10.1 #11
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,13 +3,13 @@ | |
| # Exit immediately if a command exits with a non-zero status. | ||
| set -e | ||
|
|
||
| # Default values (can be overridden by environment variables if needed) | ||
| # Default values (can be overridden by environment variables) | ||
| MLFLOW_HOST="${MLFLOW_HOST:-0.0.0.0}" | ||
| MLFLOW_DEFAULT_ARTIFACTS_DESTINATION="${MLFLOW_DEFAULT_ARTIFACTS_DESTINATION:-s3://mlflow}" | ||
|
|
||
| # Start the MLflow server using exec to replace the shell process | ||
| # "$@" allows passing additional arguments from Kubernetes 'args' if needed in the future | ||
| exec mlflow server \ | ||
| --host "$MLFLOW_HOST" \ | ||
| --artifacts-destination "$MLFLOW_DEFAULT_ARTIFACTS_DESTINATION" \ | ||
| "$@" | ||
| # Build the argument list dynamically so new optional flags can be added without branching. | ||
| # MLflow 3.x requires --allowed-hosts to be passed as a CLI flag (env var alone is insufficient). | ||
| set -- --host "$MLFLOW_HOST" --artifacts-destination "$MLFLOW_DEFAULT_ARTIFACTS_DESTINATION" | ||
| [ -n "$MLFLOW_ALLOWED_HOSTS" ] && set -- "$@" --allowed-hosts "$MLFLOW_ALLOWED_HOSTS" | ||
|
Comment on lines
+10
to
+13
|
||
|
|
||
| exec mlflow server "$@" | ||
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.
set --overwrites the container's original positional arguments, so any args provided via DockerCMD/ Kubernetesargs(previously forwarded via"$@") are now dropped. This is a behavioral regression for anyone passing additionalmlflow serverflags; consider appending the original"$@"when building the new argument list so user-supplied args are preserved (and keep the intended override order explicit).