Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(scripts): update auto install desc #1036

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/en/01-how-to-build/build_from_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ The script will also try to avoid affecting host environment:

- The dependencies of source code compilation are placed in the `mmdeploy-dep` directory at the same level as mmdeploy
- The script would not modify variables such as PATH, LD_LIBRARY_PATH, PYTHONPATH, etc.
- The environment variables that need to be modified will be printed, **please pay attention to the final output**

The script will eventually execute `python3 tools/check_env.py`, the successful installation should display the version number of the corresponding backend and `ops_is_available: True`, for example:

```bash
$ python3 tools/check_env.py
..
2022-09-13 14:49:13,767 - mmdeploy - INFO - **********Backend information**********
2022-09-13 14:49:14,116 - mmdeploy - INFO - onnxruntime: 1.8.0 ops_is_avaliable : True
2022-09-13 14:49:14,131 - mmdeploy - INFO - tensorrt: 8.4.1.5 ops_is_avaliable : True
2022-09-13 14:49:14,139 - mmdeploy - INFO - ncnn: 1.0.20220901 ops_is_avaliable : True
2022-09-13 14:49:14,150 - mmdeploy - INFO - pplnn_is_avaliable: True
..
```

Here is the verified installation script. If you want mmdeploy to support multiple backends at the same time, you can execute each script once:

Expand Down
14 changes: 14 additions & 0 deletions docs/zh_cn/01-how-to-build/build_from_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ $ python3 tools/scripts/build_ubuntu_x64_ncnn.py $(nproc)

- 源码编译的依赖,都放在与 mmdeploy 同级的 `mmdeploy-dep` 目录中
- 不会主动修改 PATH、LD_LIBRARY_PATH、PYTHONPATH 等变量
- 会打印需要修改的环境变量,**需要注意最终的输出信息**

脚本最终会执行 `python3 tools/check_env.py`,安装成功应显示对应 backend 的版本号和 `ops_is_available: True`,例如:

```bash
$ python3 tools/check_env.py
..
2022-09-13 14:49:13,767 - mmdeploy - INFO - **********Backend information**********
2022-09-13 14:49:14,116 - mmdeploy - INFO - onnxruntime: 1.8.0 ops_is_avaliable : True
2022-09-13 14:49:14,131 - mmdeploy - INFO - tensorrt: 8.4.1.5 ops_is_avaliable : True
2022-09-13 14:49:14,139 - mmdeploy - INFO - ncnn: 1.0.20220901 ops_is_avaliable : True
2022-09-13 14:49:14,150 - mmdeploy - INFO - pplnn_is_avaliable: True
..
```

这是已验证的安装脚本。如果想让 mmdeploy 同时支持多种 backend,每个脚本执行一次即可:

Expand Down
1 change: 1 addition & 0 deletions tools/scripts/build_ubuntu_x64_ncnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def install_mmdeploy(work_dir, dep_dir, ncnn_cmake_dir):

os.system('cd build && make -j {} && make install'.format(g_jobs))
os.system('python3 -m pip install -v -e .')
os.system('python3 tools/check_env.py')
return 0


Expand Down
1 change: 1 addition & 0 deletions tools/scripts/build_ubuntu_x64_ort.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def install_mmdeploy(work_dir, ort_dir):

os.system('cd build && make -j {} && make install'.format(g_jobs))
os.system('python3 -m pip install -e .')
os.system('python3 tools/check_env.py')
return 0


Expand Down
1 change: 1 addition & 0 deletions tools/scripts/build_ubuntu_x64_pplnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def install_mmdeploy(work_dir, pplnn_cmake_dir, pplcv_cmake_dir, build_cuda):

os.system('cd build && make -j {} && make install'.format(g_jobs))
os.system('python3 -m pip install -e .')
os.system('python3 tools/check_env.py')
return 0


Expand Down
1 change: 1 addition & 0 deletions tools/scripts/build_ubuntu_x64_torchscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def install_mmdeploy(work_dir, libtorch_dir):

os.system('cd build && make -j {} && make install'.format(g_jobs))
os.system('python3 -m pip install -e .')
os.system('python3 tools/check_env.py')
return 0


Expand Down