简体   繁体   中英

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

在此处输入图像描述

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM