0

I am trying to use mlflow from inside a container. My Dockerfile is

FROM jupyter/scipy-notebook

RUN pip install mlflow

RUN pip install sklearn

I use it with a run.sh script

#!/bin/bash
docker build -t chapter_1_homlflow .
docker run -p 8888:8888 -p 5000:5000 -v $(pwd):/home/jovyan/ -it chapter_1_homlflow

As you can see the ports 8888 and 5000 are being mapped. When I execute run.sh I am immediately inside a jupyter notebook that uses the port 8888 of the local host.

I do my stuff with mlflow and now I want to see its UI

so I enter the container with docker exec -it <container name> bash and from inside I do

mlflow ui

and I get

[2022-09-05 13:15:50 +0000] [4567] [INFO] Starting gunicorn 20.1.0
[2022-09-05 13:15:50 +0000] [4567] [INFO] Listening at: http://127.0.0.1:5000 (4567)
[2022-09-05 13:15:50 +0000] [4567] [INFO] Using worker: sync
[2022-09-05 13:15:50 +0000] [4568] [INFO] Booting worker with pid: 4568

So everything seems fine... but ...

when I go to http://127.0.0.1:5000 I got

The connection was reset

The connection to the server was reset while the page was loading.

I wonder what I might be doing wrong and how to solve it

Btw, when I write the URL I can see clearly there are MLFlow pages there. I just cannot view them

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • You need to run `mlflow ui -h 0.0.0.0`. In general in Docker, if something ever prints `Listening at: http://127.0.0.1:...`, it won't be reachable from outside its own container. Consider making this be your image's `CMD` so you don't have to manually retype it into a shell. – David Maze Sep 05 '22 at 14:37

0 Answers0