UiPath Documentation
automation-suite
2021.10
false
Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

添加具有 GPU 支持的专用代理节点

备注:

Automation Suite currently supports only Nvidia GPU drivers. See the list of GPU-supported operating systems.

有关特定于云的实例类型的更多信息,请参阅以下内容:

Before adding a dedicated agent node with GPU support, make sure to check Hardware requirements.

在计算机上安装 GPU 驱动程序​

备注:
  • 以下说明适用于在线和离线 Automation Suite 安装。对于离线安装,您必须确保临时互联网访问,以检索所需的 GPU 驱动程序依赖项。如果在安装 GPU 驱动程序时遇到问题,请联系 NVIDIA 支持团队。
  • GPU 驱动程序存储在/opt/nvidia和/usr文件夹下。强烈建议在 GPU 代理计算机上,这些文件夹的大小应分别至少为5 GB和15 GB 。
  1. 要在代理节点上安装 GPU 驱动程序,请运行以下命令:

    sudo yum install kernel kernel-tools kernel-headers kernel-devel
    sudo reboot
    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    sudo sed 's/$releasever/8/g' -i /etc/yum.repos.d/epel.repo
    sudo sed 's/$releasever/8/g' -i /etc/yum.repos.d/epel-modular.repo
    sudo yum config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
    sudo yum install cuda
    sudo yum install kernel kernel-tools kernel-headers kernel-devel
    sudo reboot
    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    sudo sed 's/$releasever/8/g' -i /etc/yum.repos.d/epel.repo
    sudo sed 's/$releasever/8/g' -i /etc/yum.repos.d/epel-modular.repo
    sudo yum config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
    sudo yum install cuda
    
  2. 要安装容器工具包,请运行以下命令:

    curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
            sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo
            sudo yum-config-manager --enable nvidia-container-toolkit-experimental
            sudo yum install -y nvidia-container-toolkit
    curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
            sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo
            sudo yum-config-manager --enable nvidia-container-toolkit-experimental
            sudo yum install -y nvidia-container-toolkit
    

验证驱动程序是否已正确安装

在节点上运行 sudo nvidia-smi 命令以验证驱动程序是否已正确安装。

备注:

配置集群后,需要执行其他步骤来配置已配置的 GPU。

此时,GPU 驱动程序已安装,并且 GPU 节点已添加到集群中。

向集群中添加 GPU 节点​

步骤 1:配置计算机​

请按照以下步骤配置计算机,以确保磁盘分区正确且满足所有网络要求。

步骤 2:将交互式安装程序复制到目标计算机​

在线安装​
  1. 通过 SSH 连接到任何服务器计算机。

  2. 运行以下命令,将 UiPathAutomationSuite 文件夹的内容复制到 GPU 节点(使用特定于 GPU 节点的用户名和 DNS):

    sudo su -
    scp -r /opt/UiPathAutomationSuite <username>@<node dns>:/opt/
    scp -r ~/* <username>@<node dns>:/opt/UiPathAutomationSuite/
    sudo su -
    scp -r /opt/UiPathAutomationSuite <username>@<node dns>:/opt/
    scp -r ~/* <username>@<node dns>:/opt/UiPathAutomationSuite/
    
For Offline Installation​
  1. 通过 SSH 连接到任何服务器节点。

  2. Ensure that the /opt/UiPathAutomationSuite directory contains sf-infra.tar.gz file (it is part of the installation package download step )

    scp -r ~/opt/UiPathAutomationSuite <username>@<node dns>:/var/tmp
    scp -r ~/opt/UiPathAutomationSuite <username>@<node dns>:/var/tmp
    

Step 3: Running the Interactive Installation Wizard to Configure the Dedicated Node​

在线安装​
  1. 通过 SSH 连接到 GPU 节点。

  2. 运行以下命令:

    sudo su -
    cd /opt/UiPathAutomationSuite
    chmod -R 755 /opt/UiPathAutomationSuite
    yum install unzip jq -y
    CONFIG_PATH=/opt/UiPathAutomationSuite/cluster_config.json
    
    UNATTENDED_ACTION="accept_eula,download_bundle,extract_bundle,join_gpu" ./installUiPathAS.sh
    sudo su -
    cd /opt/UiPathAutomationSuite
    chmod -R 755 /opt/UiPathAutomationSuite
    yum install unzip jq -y
    CONFIG_PATH=/opt/UiPathAutomationSuite/cluster_config.json
    
    UNATTENDED_ACTION="accept_eula,download_bundle,extract_bundle,join_gpu" ./installUiPathAS.sh
    
For Offline Installation​
  1. 通过 SSH 连接到 GPU 专用节点。

  2. 使用以下脚本在 GPU 专用节点上安装平台捆绑包:

    sudo su
    mv /var/tmp/UiPathAutomationSuite /opt
    cd /opt/UiPathAutomationSuite
    chmod -R 755 /opt/UiPathAutomationSuite
    
    ./install-uipath.sh -i ./cluster_config.json -o ./output.json -k -j gpu --offline-bundle ./sf-infra.tar.gz --offline-tmp-folder /opt/UiPathAutomationSuite/tmp --install-offline-prereqs --accept-license-agreement
    sudo su
    mv /var/tmp/UiPathAutomationSuite /opt
    cd /opt/UiPathAutomationSuite
    chmod -R 755 /opt/UiPathAutomationSuite
    
    ./install-uipath.sh -i ./cluster_config.json -o ./output.json -k -j gpu --offline-bundle ./sf-infra.tar.gz --offline-tmp-folder /opt/UiPathAutomationSuite/tmp --install-offline-prereqs --accept-license-agreement
    

Configuring the GPU Driver on the Cluster​

步骤 1:在集群上安装 GPU 驱动程序​

  1. 确保通过 SSH 连接到 GPU 计算机。

  2. 通过运行以下命令更新 GPU 节点的 contianerd 配置:

    cat <<EOF > gpu_containerd.sh
    if ! nvidia-smi &>/dev/null;
    then
      echo "GPU Drivers are not installed on the VM. Please refer the documentation."
      exit 0
    fi
    if ! which nvidia-container-runtime &>/dev/null;
    then
      echo "Nvidia container runtime is not installed on the VM. Please refer the documentation."
      exit 0
    fi
    grep "nvidia-container-runtime" /var/lib/rancher/rke2/agent/etc/containerd/config.toml &>/dev/null && info "GPU containerd changes already applied" && exit 0
    awk '1;/plugins.cri.containerd]/{print "  default_runtime_name = \"nvidia-container-runtime\""}' /var/lib/rancher/rke2/agent/etc/containerd/config.toml > /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    echo -e '\n[plugins.linux]\n  runtime = "nvidia-container-runtime"' >> /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    echo -e '\n[plugins.cri.containerd.runtimes.nvidia-container-runtime]\n  runtime_type = "io.containerd.runc.v2"\n  [plugins.cri.containerd.runtimes.nvidia-container-runtime.options]\n    BinaryName = "nvidia-container-runtime"' >> /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    EOF
    cat <<EOF > gpu_containerd.sh
    if ! nvidia-smi &>/dev/null;
    then
      echo "GPU Drivers are not installed on the VM. Please refer the documentation."
      exit 0
    fi
    if ! which nvidia-container-runtime &>/dev/null;
    then
      echo "Nvidia container runtime is not installed on the VM. Please refer the documentation."
      exit 0
    fi
    grep "nvidia-container-runtime" /var/lib/rancher/rke2/agent/etc/containerd/config.toml &>/dev/null && info "GPU containerd changes already applied" && exit 0
    awk '1;/plugins.cri.containerd]/{print "  default_runtime_name = \"nvidia-container-runtime\""}' /var/lib/rancher/rke2/agent/etc/containerd/config.toml > /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    echo -e '\n[plugins.linux]\n  runtime = "nvidia-container-runtime"' >> /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    echo -e '\n[plugins.cri.containerd.runtimes.nvidia-container-runtime]\n  runtime_type = "io.containerd.runc.v2"\n  [plugins.cri.containerd.runtimes.nvidia-container-runtime.options]\n    BinaryName = "nvidia-container-runtime"' >> /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
    EOF
    
    sudo bash gpu_containerd.sh
    sudo bash gpu_containerd.sh
    
  3. 通过运行以下命令重新启动 rke2-agent:

    systemctl restart rke2-agent
    systemctl restart rke2-agent
    

Step 2: Enabling the GPU in the Cluster​

  1. 在任意服务器节点上运行以下命令。

  2. 导航到 UiPathAutomationSuite 文件夹。

    cd /opt/UiPathAutomationSuite
    cd /opt/UiPathAutomationSuite
    

Enabling the GPU in an Online Installation​

DOCKER_REGISTRY_URL=$(cat defaults.json | jq -er ".registries.docker.url")
sed -i "s/REGISTRY_PLACEHOLDER/${DOCKER_REGISTRY_URL}/g" ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl apply -f ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl -n kube-system rollout restart daemonset nvidia-device-plugin-daemonset
DOCKER_REGISTRY_URL=$(cat defaults.json | jq -er ".registries.docker.url")
sed -i "s/REGISTRY_PLACEHOLDER/${DOCKER_REGISTRY_URL}/g" ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl apply -f ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl -n kube-system rollout restart daemonset nvidia-device-plugin-daemonset

在离线安装中启用 GPU​

DOCKER_REGISTRY_URL=localhost:30071
sed -i "s/REGISTRY_PLACEHOLDER/${DOCKER_REGISTRY_URL}/g" ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl apply -f ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl -n kube-system rollout restart daemonset nvidia-device-plugin-daemonset
DOCKER_REGISTRY_URL=localhost:30071
sed -i "s/REGISTRY_PLACEHOLDER/${DOCKER_REGISTRY_URL}/g" ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl apply -f ./Infra_Installer/gpu_plugin/nvidia-device-plugin.yaml
kubectl -n kube-system rollout restart daemonset nvidia-device-plugin-daemonset

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新