Skip to content

Commit 7ae1000

Browse files
authored
[Cherry-Pick][Fix] Fix high-performance serving bugs (#4483)
* Fix hps bug * Fix doc * Fix doc
1 parent a97df9a commit 7ae1000

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

deploy/hps/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ comments: true
1010

1111
**请注意,本项目依赖于如下环境配置:**
1212

13+
- **CPU 架构**:x86-64
1314
- **操作系统**:Linux
14-
- **Docker 版本**`>= 20.10.0`,用于镜像构建和部署
15-
- **CPU 架构**:x86-64
15+
- **Docker Engine 版本**`>= 20.10.0`,用于镜像构建和部署
1616

1717
本文档主要介绍如何基于本项目提供的脚本完成高稳定性服务化部署环境搭建与物料打包。整体流程分为两个阶段:
1818

@@ -48,7 +48,7 @@ comments: true
4848
为了使构建结果的可重现性更强,本步骤将依赖锁定到精确版本。请切换至 `server_env` 目录执行如下脚本:
4949

5050
```bash
51-
./script/freeze_requirements.sh
51+
./scripts/freeze_requirements.sh
5252
```
5353

5454
该脚本调用 `pip-tools compile` 解析依赖源文件,并最终生成一系列 `.txt` 文件(如 `requirements/gpu.txt``requirements/cpu.txt` 等),这些文件将为 [1.3 镜像构建](./README.md#13-镜像构建) 提供依赖版本约束。
@@ -85,7 +85,7 @@ comments: true
8585
对于 Triton Server,项目使用预先编译好的版本,将在构建镜像时自动下载,无需手动下载。以构建 GPU 镜像为例,在 `server_env` 目录下执行以下命令:
8686

8787
```bash
88-
./scripts/build_deployment_image.sh -k gpu -t latest-gpu
88+
./scripts/build_deployment_image.sh -k gpu -t latest-gpu
8989
```
9090

9191
构建镜像的参数配置项包括
@@ -118,10 +118,10 @@ comments: true
118118
执行成功后,命令行会输出以下提示信息:
119119

120120
```text
121-
=> => exporting to image
122-
=> => exporting layers
123-
=> => writing image sha256:ba3d0b2b079d63ee0239a99043fec7e25f17bf2a7772ec2fc80503c1582b3459
124-
=> => naming to ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-gpu
121+
=> => exporting to image
122+
=> => exporting layers
123+
=> => writing image sha256:ba3d0b2b079d63ee0239a99043fec7e25f17bf2a7772ec2fc80503c1582b3459
124+
=> => naming to ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-gpu
125125
```
126126

127127
如需批量构建 GPU 和 CPU 镜像,可以执行以下命令:
@@ -172,7 +172,7 @@ comments: true
172172
</tbody>
173173
</table>
174174

175-
调用后存储到当前目录 `/output` 路径下。
175+
调用后存储到当前目录 `output` 路径下。
176176

177177
## 3.FAQ
178178

deploy/hps/README_en.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ This project provides a high-stability serving solution, consisting of two main
1111

1212
**Note: This project relies on the following environment configurations:**
1313

14-
- **Operating System**: Linux
15-
- **Docker Version**: `>= 20.10.0` (Used for image building and deployment)
1614
- **CPU Architecture**: x86-64
15+
- **Operating System**: Linux
16+
- **Docker Engine Version**: `>= 20.10.0` (Used for image building and deployment)
1717

1818
This document mainly introduces how to set up a high stability serving environment and package related materials using the scripts provided by this project. The overall process consists of two main stages:
1919

@@ -32,13 +32,13 @@ Image Building Steps:
3232

3333
1. Build a requirement collection image. (Optional)
3434
2. Freeze requirement versions to improve the reproducibility of deployment image building. (Optional)
35-
3. Build the deployment image based on the frozen requirement information to generate the final deployment image and provide image support for subsequent pipeline execution.
35+
3. Build the deployment image based on the frozen requirement information to generate the final deployment image and provide image support for subsequent pipeline execution.
3636

3737
**If you do not need to modify requirement-related information, you can skip to [1.3 Building Image](./README_en.md#13-building-image) to build the deployment image using cached requirement information.**
3838

3939
## 1.1 Build the Requirement Collection Image (Optional)
4040

41-
Navigate to the `server_env` directory and run follow script for building the requirement collection image in this directory.
41+
Navigate to the `server_env` directory and run follow script for building the requirement collection image in this directory.
4242

4343
```bash
4444
./scripts/prepare_rc_image.sh
@@ -121,10 +121,10 @@ If the basic image cannot be pulled, please refer to the solutions in the [FAQ](
121121
After run successfully, the command line will display the following message:
122122

123123
```text
124-
=> => exporting to image
125-
=> => exporting layers
126-
=> => writing image sha256:ba3d0b2b079d63ee0239a99043fec7e25f17bf2a7772ec2fc80503c1582b3459
127-
=> => naming to ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-gpu
124+
=> => exporting to image
125+
=> => exporting layers
126+
=> => writing image sha256:ba3d0b2b079d63ee0239a99043fec7e25f17bf2a7772ec2fc80503c1582b3459
127+
=> => naming to ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:latest-gpu
128128
```
129129

130130
To build both GPU and CPU images run the following command:
@@ -140,7 +140,7 @@ This stage mainly introduces how to package pipeline materials. This function is
140140
- `client`: Responsible for invoking the model services.
141141
- `server`: Deployed using the images built in [1. Image Building](./README_en.md#1-image-building), serving as the runtime environment for model services.
142142

143-
Before packaging the pipeline materials, you need to switch to the `sdk` directory and run the `scripts/assemble.sh` script in this directory for packaging. For example, to package the general OCR pipeline, run:
143+
Before packaging the pipeline materials, you need to switch to the `sdk` directory and run the `scripts/assemble.sh` script in this directory for packaging. For example, to package the general OCR pipeline, run:
144144

145145
```bash
146146
./scripts/assemble.sh OCR
@@ -175,7 +175,7 @@ The parameters for the packaging script are described as follows:
175175
</tbody>
176176
</table>
177177

178-
After run successfully, the packaged will be stored in the `/output` directory.
178+
After run successfully, the packaged will be stored in the `output` directory.
179179

180180
## 3. FAQ
181181

@@ -191,4 +191,4 @@ When running the image build scripts, you can use the `-p` parameter to specify
191191

192192
```bash
193193
./scripts/prepare_rc_image.sh -p https://pypi.tuna.tsinghua.edu.cn/simple
194-
```
194+
```

deploy/hps/server_env/scripts/remove_images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
paddlex_version="$(cat ../../paddlex/.version)"
3+
paddlex_version="$(cat ../../../paddlex/.version)"
44

55
for device_type in 'gpu' 'cpu'; do
66
version="$(cat "${device_type}_version.txt")"

deploy/hps/server_env/scripts/tag_and_push_images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
paddlex_version="$(cat ../../paddlex/.version)"
3+
paddlex_version="$(cat ../../../paddlex/.version)"
44

55
for device_type in 'gpu' 'cpu'; do
66
version="$(cat "${device_type}_version.txt")"

0 commit comments

Comments
 (0)