2021-11-11 18:48:48 +08:00
## Build MMDeploy
2021-10-09 14:10:42 +08:00
2021-11-11 18:48:48 +08:00
### Preparation
2021-10-09 14:10:42 +08:00
2021-11-11 18:48:48 +08:00
- Download MMDeploy
2021-10-09 14:10:42 +08:00
2021-11-11 18:48:48 +08:00
```bash
git clone -b master git@github.com:grimoire/deploy_prototype.git MMDeploy
cd MMDeploy
git submodule update --init --recursive
```
Note:
- If fetching submodule fails, you could get submodule manually by following instructions:
2021-10-09 14:10:42 +08:00
2021-11-11 18:48:48 +08:00
```bash
git clone git@github.com:NVIDIA/cub.git third_party/cub
cd third_party/cub
git checkout c3cceac115
2021-12-07 10:57:55 +08:00
# go back to third_party directory and git clone pybind11
cd ..
git clone git@github.com:pybind/pybind11.git pybind11
2021-12-08 15:06:41 +08:00
cd pybind11
2021-12-07 10:57:55 +08:00
git checkout 70a58c5
2021-11-11 18:48:48 +08:00
```
- Install cmake
Install cmake>=3.14.0, you could refer to [cmake website ](https://cmake.org/install ) for more detailed info.
```bash
apt-get install -y libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
tar -zxvf cmake-3.20.0.tar.gz
cd cmake-3.20.0
./bootstrap
make
make install
```
### Build backend support
2021-11-09 17:44:42 +08:00
2021-10-09 14:10:42 +08:00
Build the inference engine extension libraries you need.
2021-11-09 17:44:42 +08:00
- [ONNX Runtime ](backends/onnxruntime.md )
2021-10-09 14:10:42 +08:00
- [TensorRT ](backends/tensorrt.md )
- [ncnn ](backends/ncnn.md )
2021-12-09 16:37:36 +08:00
- [PPLNN ](backends/pplnn.md )
2021-10-21 16:07:35 +08:00
- [OpenVINO ](backends/openvino.md )
2021-10-09 14:10:42 +08:00
### Install mmdeploy
```bash
2021-11-11 18:48:48 +08:00
cd ${MMDEPLOY_DIR} # To mmdeploy root directory
2021-10-09 14:10:42 +08:00
pip install -e .
```
2021-12-01 14:03:48 +08:00
Some dependencies are optional. Simply running `pip install -e .` will only install the minimum runtime requirements.
To use optional dependencies install them manually with `pip install -r requirements/optional.txt` or specify desired extras when calling `pip` (e.g. `pip install -e .[optional]` ).
Valid keys for the extras field are: `all` , `tests` , `build` , `optional` .