0

I want to integrate mlflow ui to our website by using an iframe, but with the header hidden if possible. I found there is an environment variable setting in the source code /mlflow/server/js/components/HomeView.js: const headerHeight = process.env.HIDE_HEADER === 'true' ? 0 : 60; But how can I specify this environment by running the server with mlflow server? I tried with HIDE_HEADER=true mlflow server, but this doesn't work. Or is there any other way to solve this?

Jason
  • 686
  • 1
  • 6
  • 13

1 Answers1

1

@Jason good question, those environment variables are read at build-time for the MLflow UI's Javascript assets. Since the PyPI MLflow wheel comes with pre-built Javascript assets, it's difficult to achieve your use case using a PyPI installation of mlflow.

However, you can build a custom MLflow wheel from source with the UI header hidden by following the instructions here, replacing the npm run build step with HIDE_HEADER=true npm run build (basically, the idea is to set the desired environment variables prior to building Javascript assets via npm run build). You can then pip-install that wheel on the node hosting your MLflow server & launch the server via mlflow server.

smurching
  • 456
  • 4
  • 3