1 回答
TA贡献1796条经验 获得超10个赞
我决定检查我的测试VM并在GCE VM上运行mlflow服务器。看看我的以下步骤:
创建基于 Ubuntu Linux 18.04 LTS 的 VM 实例
安装 MLflow:
$ sudo apt update
$ sudo apt upgrade
$ cd ~
$ git clone https://github.com/mlflow/mlflow
$ cd mlflow
$ sudo apt install python3-pip
$ pip3 install mlflow
$ python3 setup.py build
$ sudo python3 setup.py install
$ mlflow --version
mlflow, version 1.7.1.dev0
在 VM 实例的内部 IP 上运行 mlflow 服务器(默认为 127.0.0.1):
$ ifconfig
ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.XXX.15.XXX netmask 255.255.255.255 broadcast 0.0.0.0
...
$ mlflow server --host 10.XXX.15.XXX
[2020-03-09 15:05:50 +0000] [8631] [INFO] Starting gunicorn 20.0.4
[2020-03-09 15:05:50 +0000] [8631] [INFO] Listening at: http://10.128.15.211:5000 (8631)
[2020-03-09 15:05:50 +0000] [8631] [INFO] Using worker: sync
[2020-03-09 15:05:50 +0000] [8634] [INFO] Booting worker with pid: 8634
[2020-03-09 15:05:51 +0000] [8635] [INFO] Booting worker with pid: 8635
[2020-03-09 15:05:51 +0000] [8636] [INFO] Booting worker with pid: 8636
[2020-03-09 15:05:51 +0000] [8638] [INFO] Booting worker with pid: 8638
从 VM 实例检查(从第二个连接):
$ 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"
设置网络标签 mlflow-server
创建防火墙规则以允许在端口 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
...
转到网络浏览器 http://35.225.XXX.XXX:5000/
添加回答
举报