mlflow: Unable to see mlflow ui at http://127.0.0.1:5000 when mlflow is running in docker container
System information
- Have I written custom code (as opposed to using a stock example script provided in MLflow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Docker container running in macOS Sierra 10.12.3
- MLflow installed from (source or binary): Dockerfile
- MLflow version (run
python -c "from mlflow import version; print(version.VERSION)"): 0.2.1 - Python version: Python 3.6.5 :: Anaconda, Inc.
- **npm version (if running the dev UI): 5.3.0
- Exact command to reproduce:
mlflow ui
Describe the problem
Describe the problem clearly here. Be sure to convey here why it’s a bug in MLflow or a feature request.
We did a git clone of the mlflow repo and built a docker image from the Dockerfile. We spun up a docker container from that image. The container was up and running. We mapped the port to the default 5000. We tried opening a browser and reaching to “http://127.0.0.1:5000/”. Unfortunately, we still could not get the dashboard.
Note: I am conversant with dockers, kubernetes, etc. Let me know how can help.
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 18 (3 by maintainers)
Links to this issue
Commits related to this issue
- Merge pull request #109 from criteo-forks/bump_version_to_1.6 Update versions for R and Python to 1.6.0 — committed to jdlesage/mlflow by jcuquemelle 4 years ago
@datariders I had the same issue. The problem here is gunicorn is binding to just
127.0.0.1inside the container. The workaround is to pass host while starting your ui likemlflow ui --host 0.0.0.0. Or you can also go into/app/mlflow/cli.pyand change the default host to0.0.0.0.I did this and was able to access the UI from chrome on my host using
localhost:5000or127.0.0.1:5000Let me know if this works out for you.
@bubblefoil Thanks for your reply. I am able to see the log [INFO] Listening at: http://0.0.0.0:5000 but I am still not able to access the UI at http://127.0.0.1:5000/ or http://localhost:5000/
Do you have any input?
Here is how I solved it and it works.
docker run -t -i -p 8000:8000 -e GUNICORN_CMD_ARGS="--bind=0.0.0.0" docker.io/library/diabetesHi @mparkhe , I have tried that too and I get the same error - Can’t connect to (‘127.0.0.1’, 5000) Running the mlflow server failed
I am trying to self host mlflow on local machine and not using azure databricks.
Note, using mlflow server seemed to work for this, mlflow ui seemed not to accept --host parameter?
having said that, we’re currently using notebook server proxy extension, so that mlflow ui is exposed through jupyter url like …/proxy/5000/ . No problems until now, no ports to handle on container, and we inherit jupyter auth.
(recent fix for mlflow ui relative url now allows this to work properly through proxy https://github.com/mlflow/mlflow/pull/1413 )