
286
|
第
6
章
在
Cloud AI Platform
上运行管道
我们可以在
Cloud AI Platform Pipelines
上运行
TFX
管道,它将为我们管理基础设
施的底层细节。为了将管道部署到
AI Platform
,我们将管道代码打包为
Docker
容
器(
https://oreil.ly/rdXeb
)并将它托管在
Google Container Registry
(
https://oreil.
ly/m5wqD
)(
GCR
)
注
6
。一旦我们的容器化管道代码被推送到
GCR
,我们将使用
TFX CLI
创建管道:
tfx pipeline create \
--pipeline-path=kubeflow_dag_runner.py \
--endpoint='your-pipelines-dashboard-url' \
--build-target-image='gcr.io/your-pipeline-container-url'
在上面的命令中,
endpoint
对应于
AI Platform Pipelines
仪表板(
dashboard
)的
URL
。当它完成时,我们将在管道仪表板中看到刚刚创建的管道。
create
命令创建
了一个管道资源,我们可以通过创建
run
来调用它:
tfx run create --pipeline-name='your-pipeline-name' --endpoint='pipeline-url'
在运行这个命令之后,我们将能够看到一个随着我们的管道逐步运行而实时更新的
图。从管道仪表板,我们可以进一步检查各个步骤 ...