- 入门指南
- 框架组件
- AI Center 中的 Document Understanding
- 管道
- ML 包
- Data Manager
- OCR 服务
- 许可
- 参考
Before proceeding, make sure you meet the Requirements and install the Prerequisites.
要求
本节详细介绍了安装 Data Manager 的硬件要求和软件要求。
硬件要求
- 涉及的计算机:云虚拟机、内部部署计算机或笔记本电脑
- 操作系统:Windows (Windows 10) 或 Linux (Ubuntu/CentOS/RedHat)
- 计算引擎:CPU
- OCR:必需
| CPU 核心 | RAM (GB) | 硬盘 (GB) |
|---|---|---|
| 1 | 4 | Resolution settings |
软件要求
Linux 操作系统
如果您在云虚拟机上安装产品,则支持以下操作系统:
| 软件 | 版本 |
|---|---|
| Ubuntu | 20.04 LTS 18.04 LTS 16.04 LTS |
| RHEL | 7.x |
如果您在内部部署数据中心的计算机上安装产品,则支持以下操作系统:
| 软件 | 版本 |
|---|---|
| Ubuntu | 20.04 LTS 18.04 LTS 16.04 LTS |
| RHEL | 7.x |
| CentOS | 7.x |
Windows 操作系统
See the official Docker website for the list of Windows operating systems supported.
在 Windows 上,您的计算机需要启用虚拟化。我们强烈建议您仅在笔记本电脑或桌面工作站等物理计算机上执行此操作。我们不支持使用嵌套虚拟化技术在虚拟机(云或数据中心)的 Windows 上的 Docker 上运行。
浏览器
| 软件 | 版本 |
|---|---|
| Google Chrome | 50+ |
网络配置
(Optional) Data Manager needs access to AI Center on-premises or to public SaaS endpoints like https://du.uipath.com/ie/invoices in case Prelabelling is needed.
Data Manager 需要访问 OCR 引擎 <IP>:<port_number>。OCR 引擎可能是内部部署 UiPath Document OCR、内部部署 Omnipage OCR、Google Cloud Vision OCR、Microsoft Read Azure 或内部部署 Microsoft Read。
先决条件
Data Manager 是在 Docker 之上运行的容器化应用程序。它不能在与本地部署 AI Center 相同的计算机上运行。要在单独的计算机上运行它,您只需安装 Docker(在 Linux 上)或 Docker Desktop(在 Windows 上)。
Docker 映像的大小可能多达数 GB,因此 Docker 在 Linux 上用于保存其文件的文件夹必须位于足够大的分区上,以免空间不足。默认情况下,它始终位于根分区上。
要查看根分区的大小,请在终端中键入以下内容,并在最右侧的列中查找具有 / 的行:
df -h
df -h
If the size of that partition is smaller than the minimal storage requirements, then see the Configuring the Docker Data Folder section.
安装 Docker
Linux
Follow instructions in the official Docker documentation, or run this command:
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu
If this command fails, then you have an incompatible Linux operating system and you need to request your IT to install Docker on the machine following the instructions in the official Docker documentation.
Azure 虚拟机
如果要在 Azure 虚拟机上安装,请改用此命令:
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu --cloud azure
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu --cloud azure
Windows 10
Download and install Docker Desktop. On recently updated versions of Windows 10, you will need WSL2 installed. So when presented with a dialog saying "WSL 2 Installation is Incomplete" please click the Restart button.
运行 Data Manager 时,您需要为每个 Docker 容器创建一个工作文件夹(对于 Data Manager,可能名为 workdir),并将其路径包含在 docker run 命令中的 -v 标志后面。在 Windows 上执行此操作时,Docker Desktop 将弹出如下通知。您需要单击“共享”以继续。
配置 Docker 数据文件夹(仅限 Linux)
填写您希望 Docker 将其文件保存到的文件夹的路径,然后运行此命令,接着重新启动:
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --change-mount </path/to/folder>
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --change-mount </path/to/folder>
Docker 速查表
Docker 帮助以“Docker 映像”形式发布软件。映像的运行实例称为容器。只要有映像,就可以根据需要多次停止、删除和重新启动容器。
删除映像后,映像将丢失。恢复映像的唯一方法是,如果它仍然存在,请从它来自的注册表中再次拉取它。
A running container is analogous to a small Virtual Machine, in that it has an internal filesystemand network interfaces, which are separate from the host machine filesystem and network. Folders and ports can be mapped from the container to the host using –v and –p arguments, respectively.
在下表中,您可以找到 Docker 命令行的常用命令列表。
Click here for the full list of base Docker commands.
| 命令 | 描述 |
|---|---|
|
“ |
登录到注册表。 |
|
“ |
从注册表下载映像。标签“latest”通常用于指代映像的最新版本。 |
|
"`docker run –d -p 5000:80 <registry name>/<image name>:<image tag> 或 docker run –d –p 5000:80 <image id> `" |
Run a container in detached mode, while mapping port 80 from inside the container to port 5000 on the host machine, and <container folder> to <host folder>. Detached mode means the container does not block the terminal, so you can perform other operations on the same terminal. |
|
“ |
列出系统中存在的映像。 |
|
“ |
列出所有容器(正在运行和已停止)。
|
|
“ |
停止容器
|
|
“ |
删除容器
|
|
“ |
并显示容器的日志 |
|
“ |
从系统中删除一个或多个映像。
|
|
“ |
删除所有已停止的容器 |
Linux 终端速查表
| 命令 | 描述 |
|---|---|
“sudo <any_command>” | 以管理员身份运行命令。遇到“权限被拒绝”错误时,请尝试此方法。 |
“ifconfig” | 显示有关系统中网络接口的信息。在 eth0 或 docker0 部分中找到您的计算机 IP。 |
“pwd” | 显示当前文件夹的路径。 |
“ls” | 列出目录的内容。 |
“cd <folder_name>” | 转到其他文件夹。 |
“mkdir <folder_name>” | 创建新文件夹。 |
安装 Data Manager
确保您拥有注册表凭据。如果您尚未收到注册表凭据,则需要联系销售代表并请求为您生成一组凭据。
然后在 Powershell 或命令行终端(在 Windows 上)或 Shell 终端(在 Linux 上)中键入以下内容:
docker login aiflprodweacr.azurecr.io -u <username> -p <password>docker pull aiflprodweacr.azurecr.io/datamanager:latest
docker login aiflprodweacr.azurecr.io -u <username> -p <password>docker pull aiflprodweacr.azurecr.io/datamanager:latest
Data Manager 独立容器不能与 AI Center 在同一台计算机上运行。
启动 Data Manager
要启动 Data Manager,请使用以下命令:
docker run -d -p <port_number>:80 -v "<path_to_working_folder>:/app/data" aiflprodweacr.azurecr.io/datamanager:latest --license-agreement accept
docker run -d -p <port_number>:80 -v "<path_to_working_folder>:/app/data" aiflprodweacr.azurecr.io/datamanager:latest --license-agreement accept
将 <port_number> 替换为您希望 Data Manager 能够访问的端口号。成千上万个端口是常见端口,例如 5000、8000、8080、8081 等。将 <path_to_working_folder> 替换为您希望 Data Manager 在其中保留其所有内部配置和数据的本地文件夹。确保 Docker 服务有权访问该文件夹。
运行此命令后,打开网页浏览器并输入以下 URL:http://localhost:<port_number>。
如果您使用的是不同的机器上的浏览器,请将 localhost 替换为运行 datamanager 容器的机器的 IP 地址。
要运行多个 Data Manager 会话,请更改文件夹路径,然后再次运行命令。
自签名证书
如果在内部部署 AI Center 中部署的 ML 技能未使用有效的 HTTPS 证书,您可以使用命令行选项将自签名证书的根列入白名单。
证书需要为 PEM 格式。只要满足此要求,文件扩展名就可以忽略不计。
证书必须存在于 Docker 容器中,因此必须进行装载。因此,请使用 -v 将证书文件装载到容器中,然后指定该文件的路径:
docker run -d -p <port_number>:80 -v "<path_to_working_folder>:/app/data" -v "<path_to_certificate_file>":/custom.cer aiflprodweacr.azurecr.io/datamanager:latest --license-agreement accept --custom-root-cert="/custom.cer"
docker run -d -p <port_number>:80 -v "<path_to_working_folder>:/app/data" -v "<path_to_certificate_file>":/custom.cer aiflprodweacr.azurecr.io/datamanager:latest --license-agreement accept --custom-root-cert="/custom.cer"
path_to_certificate_file 不支持符号链接。
自签名证书的根(在本示例中为 custom.cer)在第一个参数和第二个参数中必须相同。如果更改了其中一个参数,则也需要更改另一个参数。
离线环境(无法访问互联网)
如果您需要在无法访问互联网(实体隔离)的计算机上设置 Data Manager,则需要在其他可以访问互联网的计算机上运行上述命令。
Then you need to save the container as a .tar file, copy the file over to the airgapped machine, and then load it. This is done using the docker save and docker load commands described in Docker documentation.
因此,在连接到互联网的计算机上,您需要先安装 Docker,然后在运行上述的 docker login 和 docker pull 命令后,您需要运行以下命令:
docker save -o datamanager-latest.tar aiflprodweacr.azurecr.io/datamanager:latest
docker save -o datamanager-latest.tar aiflprodweacr.azurecr.io/datamanager:latest
接着,您需要将 .tar 文件复制到离线计算机,然后在该 .tar 文件保存到的文件夹中运行此命令:
docker load --input datamanager-latest.tar
docker load --input datamanager-latest.tar
请注意,tar 文件将很大,可能会多达数 GB。