Unverified Commit af2f072e authored by pppppM's avatar pppppM Committed by GitHub
Browse files

Revert "[Docs] Simplify `build.md` (#370)" (#586)

This reverts commit 4b5c2bda.
parent baf1801b
## Build from source ## 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: - install packages for compiling and running:
```shell ```shell
conda create -n lmdeploy python=3.10
conda activate lmdeploy
git clone https://github.com/InternLM/lmdeploy.git
cd lmdeploy
pip install -r requirements.txt pip install -r requirements.txt
conda install openmpi-mpicxx nccl rapidjson -c conda-forge
``` ```
- 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: - build and install lmdeploy:
```shell ```shell
mkdir build && cd build mkdir build && cd build
sh ../generate.sh sh ../generate.sh
......
### 源码安装 ### 源码安装
- 确保物理机环境的 gcc 版本不低于 9,可以通过`gcc --version`确认。
- 安装编译和运行依赖包: - 安装编译和运行依赖包:
```shell ```shell
conda create -n lmdeploy python=3.10
conda activate lmdeploy
git clone https://github.com/InternLM/lmdeploy.git
cd lmdeploy
pip install -r requirements.txt pip install -r requirements.txt
conda install openmpi-mpicxx nccl rapidjson -c conda-forge
``` ```
- 安装 [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 编译安装: - lmdeploy 编译安装:
```shell ```shell
mkdir build && cd build mkdir build && cd build
sh ../generate.sh sh ../generate.sh
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment