安装

交互式功能仅依赖于Docker,对操作系统没有强依赖性,因此理论上单个安装包可适用于所有系统。在实际测试中,我们已成功在Ubuntu和macOS系统上完成测试,同时兼容ARM64和x86_64架构。

前提条件

  • Docker安装: 确保您已在Mac或Linux机器上安装并配置好Docker。如果尚未安装Docker,可在此处here查看安装指南。

  • Python安装: 交互式环境需要 Python >= 3.8pip >= 19.3

安装与部署交互式引擎

我们提供了一个名为gsctl的命令行工具,可用于安装、启动和管理交互式服务。

注意

交互式服务部署在Docker容器中,确保在不同运行时环境下的兼容性。

pip3 install gsctl
# Deploy the interactive service in local mode
gsctl instance deploy --type interactive 

注意

除了交互式服务器外,还部署了一个协调器服务器。该协调器服务器的功能类似于k8s的ApiServer,使用户能够通过一套精简且标准化的API与GraphScope平台进行交互。

屏幕上将显示以下消息,告知您可用的服务:

Coordinator is listening on {coordinator_port} port, you can connect to coordinator by:
    gsctl connect --coordinator-endpoint http://127.0.0.1:{coordinator_port}

Interactive service is ready, you can connect to the interactive service with interactive sdk:
Interactive Admin service is listening at
    http://127.0.0.1:7777,
You can connect to Interactive service with Interactive SDK on this host, with following environment variables declared.

############################################################################################
    export INTERACTIVE_ADMIN_ENDPOINT=http://127.0.0.1:7777
    export INTERACTIVE_STORED_PROC_ENDPOINT=http://127.0.0.1:10000
    export INTERACTIVE_CYPHER_ENDPOINT=neo4j://127.0.0.1:7687
############################################################################################

To access the service from another host via the network, replace `127.0.0.1` with the public IP address and ensure that the ports are exposed to the public network.

注意

如果在部署Interactive时自定义了端口,请记得将默认端口替换为您自定义的端口。

请记得复制并执行环境变量导出命令,Interactive SDKs依赖这些环境变量来建立与Interactive Services的连接。

如需了解更多关于部署Interactive的信息,请参阅部署指南。如果您希望自定义部署方式,例如直接从源代码部署,请查看从源代码部署

要了解GraphScope Interactive的使用方法,请参阅getting_started

服务可访问性

交互式服务通过容器部署,并通过端口映射对外暴露。若要在服务所在机器上访问,只需使用gsctl deploy打印的本地连接端点。若需通过网络从其他机器连接该服务,请确保交互式服务暴露的端口对公网开放且未被安全策略或防火墙拦截。