Linux DEB

对于不使用 Docker 映像或 RPM 的 Linux 计算机,提供了适用于 x86_64 Ubuntu 16.04/18.04 的 deb 安装方式。

以下安装步骤假设您已有 Driverless AI 的有效许可证密钥。请访问 https://www.h2o.ai/products/h2o-driverless-ai/,了解如何获取 Driverless AI 许可证密钥。获取密钥后,首次登录时系统将提示您将许可证密钥粘贴至 Driverless AI UI 中,或者您可以将其保存为 .sig 文件并放置于您将在安装过程中创建的 license 文件夹中。

注解

为确保在本机安装上正确生成 AutoDoc 管道可视化,推荐安装 fontconfig

环境

操作系统

最小内存

带有 GPU 的 Ubuntu

64 GB

带有 CPU 的 Ubuntu

64 GB

要求

  • Ubuntu 16.04/Ubuntu 18.04

  • 推荐 NVIDIA 驱动器 >= 471.68 (仅 GPU)

  • OpenCL(需要在 GPU 驱动系统上完全支持 LightGBM)

  • Driverless AI deb,可从 https://www.h2o.ai/download/ 获取

请注意 :Driverless AI 软件包中包括 CUDA 11.2.2(适用于 GPU)、cuDNN(在 GPU 上支持 TensorFlow 时需要)。

关于安装

  • 如果 ‘getent passwd’ 找不到 ‘dai’ 服务用户,则可(在 /etc/passwd 中)本地创建 ‘dai’ 服务用户。rpm 或 dpkg 安装期间,可以通过提供 DAI_USER 环境变量来覆盖原有用户。

  • 如果 ‘getent group’ 找不到 ‘dai’ 服务用户组,则可(在 /etc/group 中)本地创建 ‘dai’ 服务用户组。rpm 或 dpkg 安装期间,可以通过提供 DAI_GROUP 环境变量来覆盖原有用户组。

  • 配置文件位于 /etc/dai 中,所有者为 ‘root’ 用户:

    • /etc/dai/config.toml:Driverless AI 配置文件(请参阅 使用 config.toml 文件 一节,了解详细信息)

    • /etc/dai/User.conf:指定服务用户的 Systemd 配置文件

    • /etc/dai/Group.conf:指定服务用户组的 Systemd 配置文件

    • /etc/dai/EnvironmentFile.conf:指定(可选)环境变量覆盖的 Systemd 配置文件

  • 软件文件位于 /opt/h2oai/dai 中,所有者为 ‘root’ 用户:

  • 以下目录的所有者均为服务用户,因而可以通过正在运行的软件进行更新:

    • /opt/h2oai/dai/home:应用程序的主目录(许可证密钥文件存储于此)

    • /opt/h2oai/dai/tmp:实验和导入的数据均存储于此

    • /opt/h2oai/dai/log:如果您 使用 systemd,登录文件将存储于此(如果您使用 systemd,则可使用标准的 journalctl 工具)

  • 默认情况下,Driverless AI 会在 /opt/h2oai/dai/home/.driverlessai/license.sig 中搜索许可证密钥。如果您以编程方式安装 Driverless Ai,则可将许可证密钥文件复制到该位置。如果未找到许可证密钥,此应用程序将以交互方式指导您从 Web UI 中进行添加。

  • systemd 单元文件位于 /usr/lib/systemd/system 中

  • /etc/dai files 中配置文件的符号链接位于 /etc/systemd/system 中

如果您的环境正在运行可操作的 systemd,这即是管理 Driverless AI 的首选方式。此软件包将安装以下 systemd 服务和一项包装器服务:

  • dai:启动/终止其他三项服务的包装器服务

  • dai-dai:主要的 Driverless AI 进程

  • dai-h2o:Driverless AI 使用的 H2O-3 帮助程序进程

  • dai-procsy:Driverless AI 使用的 Procsy 帮助程序进程

  • dai-vis-server:Driverless AI 使用的可视化服务器帮助程序进程

如果您没有 systemd,请参阅 Linux TAR SH 了解安装说明。

启动 NVIDIA 持久模式(仅 GPU)

如果您使用 NVIDIA GPU,则必须运行以下 NVIDIA 命令。每次重启时均需运行此命令。更多信息,请参阅:http://docs.nvidia.com/deploy/driver-persistence/index.html

sudo nvidia-smi -pm 1

安装 OpenCL

在 GPU 驱动系统上完全支持 LightGBM 时需要 OpenCL。要安装 OpenCL,以 root 用户身份运行以下命令:

mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd && chmod a+r /etc/OpenCL/vendors/nvidia.icd && chmod a+x /etc/OpenCL/vendors/ && chmod a+x /etc/OpenCL

注解

如果没有安装 OpenCL,则自动使用 CUDA LightGBM。仅 Pascal 驱动(及更高)系统支持 CUDA LightGBM,可使用 enable_lightgbm_cuda_support config.toml 设置手动将其启用。

安装 Driverless AI Linux DEB

运行以下命令以安装 Driverless AI DEB。

# Install Driverless AI.
sudo dpkg -i dai_1.10.1.2-1_amd64.deb

默认情况下,Driverless AI 进程的所有者为 ‘dai’ 用户和 ‘dai’ 用户组。您可以指定下方显示的其他服务用户和用户组。并视情况替换 <myuser> 和 <mygroup>。

# Temporarily specify service user and group when installing Driverless AI.
# dpkg saves these for systemd in the /etc/dai/User.conf and /etc/dai/Group.conf files.
sudo DAI_USER=myuser DAI_GROUP=mygroup dpkg -i dai_1.10.1.2-1_amd64.deb

您现在可以更改 /etc/dai/config.toml

启动 Driverless AI

要启动 start Driverless AI,使用以下命令:

# If you are running in multinode (worker_info="multinode"), you must start minio before stating Driverless AI
sudo systemctl start dai-minio

# Start Driverless AI.
sudo systemctl start dai

请注意 :如果您没有 systemd,请参阅 Linux TAR SH 了解安装说明。

查看 Driverless AI 日志文件

如果您使用 systemd(首选):

sudo systemctl status dai-dai
sudo systemctl status dai-h2o
sudo systemctl status dai-procsy
sudo systemctl status dai-vis-server
sudo journalctl -u dai-dai
sudo journalctl -u dai-h2o
sudo journalctl -u dai-procsy
sudo journalctl -u dai-vis-server

如果您未使用 systemd:

sudo less /opt/h2oai/dai/log/dai.log
sudo less /opt/h2oai/dai/log/h2o.log
sudo less /opt/h2oai/dai/log/procsy.log
sudo less /opt/h2oai/dai/log/vis-server.log

停止 Driverless AI

如果您使用 systemd(首选):

# Stop Driverless AI.
sudo systemctl stop dai

# The processes should now be stopped.  Verify.
sudo ps -u dai

如果您未使用 systemd:

# Stop Driverless AI.
sudo pkill -U dai

# The processes should now be stopped.  Verify.
sudo ps -u dai

升级 Driverless AI

警告

  • 此版本不支持 1.7.0 及更低版本的实验和 MLI 模型。

  • 实验、MLI 和 MOJO 存储于 Driverless AI tmp 目录中,并且在 Driverless AI 升级时不会自动升级。我们建议您在升级前采取以下措施。

    • 升级前构建 MLI 模型

    • 升级前构建 MOJO 管道。

    • 升级前停止 Driverless AI 并备份 Driverless AI tmp 目录。

如果在升级 Driverless AI 前未在务必模型上构建 MLI,则升级后将不能在该模型上查看 MLI。升级前,请务必在您想要在未来版本中继续进行解释的模型上运行 MLI 作业。如果当前版本的解释模型列表中含有此 MLI 作业,则在升级后将保留。

如果在升级 Driverless AI 前未在模型上构建 MOJO 管道,则升级后将不能在该模型上构建 MOJO 管道。升级前,请务必在所需的全部模型上构建 MOJO 管道,然后备份 Driverless AI tmp 目录。

在升级过程中,将从 /etc/dai/User.conf and /etc/dai/Group.conf 继承服务用户与用户组权限。升级期间,您无需手动指定 DAI_USER 或 DAI_GROUP 环境变量。

要求

我们建议在您的主机环境中安装 NVIDIA 驱动程序 >= 471.68 (仅 GPU),以便在所有架构上获得无缝体验,包括 Ampere 架构。Driverless AI 自带 GPU 的 CUDA 11.2.2,但是主机环境中必须有驱动程序。

前往 NVIDIA download driver,获取最新的 NVIDIA Tesla A/T/V/P/K 系列驱动程序。关于 CUDA 工具包和驱动程序最低版本要求及 CUDA 工具包和相应的驱动程序版本的参考,请参见 here .

升级步骤

如果您使用 systemd(首选):

# Stop Driverless AI.
sudo systemctl stop dai

# Make a backup of /opt/h2oai/dai/tmp directory at this time.

# Upgrade Driverless AI.
sudo dpkg -i dai_1.10.1.2-1_amd64.deb
sudo systemctl daemon-reload
sudo systemctl start dai

如果您未使用 systemd:

# Stop Driverless AI.
sudo pkill -U dai

# The processes should now be stopped.  Verify.
sudo ps -u dai

# Make a backup of /opt/h2oai/dai/tmp directory at this time. If you do not, all previous data will be lost.

# Upgrade and restart.
sudo dpkg -i dai_1.10.1.2-1_amd64.deb
sudo -H -u dai /opt/h2oai/dai/run-dai.sh

卸载 Driverless AI

如果您使用 systemd(首选):

# Stop Driverless AI.
sudo systemctl stop dai

# The processes should now be stopped.  Verify.
sudo ps -u dai

# Uninstall Driverless AI.
sudo dpkg -r dai

# Purge Driverless AI.
sudo dpkg -P dai

如果您未使用 systemd:

# Stop Driverless AI.
sudo pkill -U dai

# The processes should now be stopped.  Verify.
sudo ps -u dai

# Uninstall Driverless AI.
sudo dpkg -r dai

# Purge Driverless AI.
sudo dpkg -P dai

警告! 此时,您可以选择彻底移除所有剩余文件,包括数据库。(此操作无法撤销):

sudo rm -rf /opt/h2oai/dai
sudo rm -rf /etc/dai

请注意:在卸载过程中不会移除 UID 和 GID。可使用 userdelusergroup 将其移除。但是,如果您计划重新安装 Driverless AI,则我们不建议移除 UID 和 GID。如果您移除 UID 和 GID,然后重新安装 Driverless AI,则该 UID 和 GID 将很可能被重新分配给其他(不相关的)用户/用户组;如果文件系统中有任何剩余文件涉及到被移除的用户或用户组,则可能会引起混乱。

常见问题

Driverless AI 启动失败,并在 Ubuntu 18 上显示以下消息:``Segmentation fault (core dumped)``.

此问题由 NotoColorEmoji.ttf 字体引起,因为 Python matplotlib 库无法处理此字体。通过重命名来禁用此字体,即可解决此问题。(请勿使用 fontconfig,因为会被 matplotlib 忽略。)以下示例展示了应执行的命令。

sudo find / -name "NotoColorEmoji.ttf" 2>/dev/null | xargs -I{} echo sudo mv {} {}.backup