-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support serving with gradio without communicating to TIS (#162)
* use local model for webui * local model for app.py * lint * remove print * add seed * comments * fixed seesion_id * support turbomind batch inference * update app.py * lint and docstring * move webui to serve/gradio * update doc * update doc * update docstring and rmeove print conversition * log * Update docs/zh_cn/build.md Co-authored-by: Chen Xin <[email protected]> * Update docs/en/build.md Co-authored-by: Chen Xin <[email protected]> * use latest gradio * fix * replace partial with InterFace * use host ip instead of coolie --------- Co-authored-by: Chen Xin <[email protected]>
- Loading branch information
Showing
8 changed files
with
430 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Build from source | ||
|
||
- make sure local gcc version no less than 9, which can be conformed by `gcc --version`. | ||
- install packages for compiling and running: | ||
```shell | ||
pip install -r requirements.txt | ||
``` | ||
- install [nccl](https://docs.nvidia.com/deeplearning/nccl/install-guide/index.html), set environment variables: | ||
```shell | ||
export NCCL_ROOT_DIR=/path/to/nccl/build | ||
export NCCL_LIBRARIES=/path/to/nccl/build/lib | ||
``` | ||
- install rapidjson | ||
- install openmpi, installing from source is recommended. | ||
```shell | ||
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz | ||
tar -xzf openmpi-*.tar.gz && cd openmpi-* | ||
./configure --with-cuda | ||
make -j$(nproc) | ||
make install | ||
``` | ||
- build and install lmdeploy: | ||
```shell | ||
mkdir build && cd build | ||
sh ../generate.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
### 源码安装 | ||
|
||
- 确保物理机环境的 gcc 版本不低于 9,可以通过`gcc --version`确认。 | ||
- 安装编译和运行依赖包: | ||
```shell | ||
pip install -r requirements.txt | ||
``` | ||
- 安装 [nccl](https://docs.nvidia.com/deeplearning/nccl/install-guide/index.html),设置环境变量 | ||
```shell | ||
export NCCL_ROOT_DIR=/path/to/nccl/build | ||
export NCCL_LIBRARIES=/path/to/nccl/build/lib | ||
``` | ||
- rapidjson 安装 | ||
- openmpi 安装, 推荐从源码安装: | ||
```shell | ||
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz | ||
tar -xzf openmpi-*.tar.gz && cd openmpi-* | ||
./configure --with-cuda | ||
make -j$(nproc) | ||
make install | ||
``` | ||
- lmdeploy 编译安装: | ||
```shell | ||
mkdir build && cd build | ||
sh ../generate.sh | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. |
Oops, something went wrong.