JSVJ
JSVJ

Reputation: 503

MLFlow in container is not mapped to host port

I am learning about MLFlow and Docker Containers. I created an ubuntu container and mapped port 5001 of the host to 5000 of the container.

docker run -it -p 5001:5000 -v D:\Docker\mlflow:/home --name mlflow ubuntu:18.04 bash

Inside the container, I installed the mlflow using pip

pip install mlflow

enter image description here

When I run the mlflow UI it's running but I can't access it from my host PC (localhost:5001) is not working.

Did I do any mistakes anywhere?

Upvotes: 2

Views: 1680

Answers (1)

Matin Zivdar
Matin Zivdar

Reputation: 711

The problem is that you are starting the server on 127.0.0.1 and the port mapping was not pointing to this interface (socket hang up). Starting it on all interfaces 0.0.0.0 works.

You should just run this command in the container.

mlflow ui -h 0.0.0.0

Upvotes: 3

Related Questions