Python 在GCP虚拟机上运行MLFlow

Python 在GCP虚拟机上运行MLFlow,python,google-cloud-platform,mlflow,Python,Google Cloud Platform,Mlflow,我已经在GCP VM实例上安装了mlflow, 现在我想使用外部IP访问mlflow UI。 我尝试设置防火墙规则并打开mlflow的默认端口,但无法访问它。 有人能给出在VM实例上运行mlflow的分步过程吗?我决定检查我的测试VM并在GCE VM上运行mlflow服务器。请看下面我的步骤: 基于Ubuntu Linux 18.04 LTS创建VM实例 : 在VM实例的内部IP上运行mlflow server(默认127.0.0.1): mlflow服务器 允许访问端口5000 $ gcl

我已经在GCP VM实例上安装了mlflow, 现在我想使用外部IP访问mlflow UI。 我尝试设置防火墙规则并打开mlflow的默认端口,但无法访问它。
有人能给出在VM实例上运行mlflow的分步过程吗?

我决定检查我的测试VM并在GCE VM上运行mlflow服务器。请看下面我的步骤:

  • 基于Ubuntu Linux 18.04 LTS创建VM实例
  • :

  • 在VM实例的内部IP上运行mlflow server(默认127.0.0.1):

  • mlflow服务器

  • 允许访问端口5000

    $ gcloud compute --project=test-prj firewall-rules create mlflow-server --direction=INGRESS --priority=999 --network=default --action=ALLOW --rules=tcp:5000 --source-ranges=0.0.0.0/0 --target-tags=mlflow-server
    
  • 从本地Linux机器检查
    nmap-Pn 35.225.XXX.XXX

    Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-09 16:20 CET
    Nmap scan report for 74.123.225.35.bc.googleusercontent.com (35.225.XXX.XXX)
    Host is up (0.20s latency).
    Not shown: 993 filtered ports
    PORT     STATE  SERVICE
    ...
    5000/tcp open   upnp
    ...
    
  • 转到web浏览器


  • 您成功地设置了防火墙规则吗?是的,我创建了防火墙规则,但当我试图通过指定某个端口来派生mlflow时,它无法正常工作!尝试使用
    nmap
    util检查端口是否打开。要执行此操作,请运行您的虚拟机实例的命令
    $nmap-Pn EXTERNAL\u IP\u
    。如果您的端口仍然关闭,请使用防火墙规则更新问题。
    $ curl -I http://10.XXX.15.XXX:5000
    HTTP/1.1 200 OK
    Server: gunicorn/20.0.4
    Date: Mon, 09 Mar 2020 15:06:08 GMT
    Connection: close
    Content-Length: 853
    Content-Type: text/html; charset=utf-8
    Last-Modified: Mon, 09 Mar 2020 14:57:11 GMT
    Cache-Control: public, max-age=43200
    Expires: Tue, 10 Mar 2020 03:06:08 GMT
    ETag: "1583765831.3202355-853-3764264575"
    
    $ gcloud compute --project=test-prj firewall-rules create mlflow-server --direction=INGRESS --priority=999 --network=default --action=ALLOW --rules=tcp:5000 --source-ranges=0.0.0.0/0 --target-tags=mlflow-server
    
    Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-09 16:20 CET
    Nmap scan report for 74.123.225.35.bc.googleusercontent.com (35.225.XXX.XXX)
    Host is up (0.20s latency).
    Not shown: 993 filtered ports
    PORT     STATE  SERVICE
    ...
    5000/tcp open   upnp
    ...