Skip to content

Commit e7dd7d5

Browse files
xin-li-67lvhan028
authored andcommitted
[Enhancement] Switch pip to mim in Docs and Dockerfile (#1591)
* change pip install to mim install in docs and Dockerfil * merge with latest dev-1.x
1 parent 03fa3db commit e7dd7d5

File tree

8 files changed

+26
-21
lines changed

8 files changed

+26
-21
lines changed

docker/CPU/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM openvino/ubuntu18_dev:2021.4.2
2-
ARG PYTHON_VERSION=3.7
2+
ARG PYTHON_VERSION=3.8
33
ARG TORCH_VERSION=1.10.0
44
ARG TORCHVISION_VERSION=0.11.0
55
ARG ONNXRUNTIME_VERSION=1.8.1
@@ -114,4 +114,4 @@ RUN cd mmdeploy && rm -rf build/CM* && mkdir -p build && cd build && cmake .. \
114114
-DMMDEPLOY_CODEBASES=all &&\
115115
cmake --build . -- -j$(nproc) && cmake --install . &&\
116116
export SPDLOG_LEVEL=warn &&\
117-
if [ -z ${VERSION} ] ; then echo "Built MMDeploy master for CPU devices successfully!" ; else echo "Built MMDeploy version v${VERSION} for CPU devices successfully!" ; fi
117+
if [ -z ${VERSION} ] ; then echo "Built MMDeploy 1.x for CPU devices successfully!" ; else echo "Built MMDeploy version v${VERSION} for CPU devices successfully!" ; fi

docker/GPU/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ RUN cd /root/workspace/mmdeploy &&\
101101
-DMMDEPLOY_CODEBASES=all &&\
102102
make -j$(nproc) && make install &&\
103103
export SPDLOG_LEVEL=warn &&\
104-
if [ -z ${VERSION} ] ; then echo "Built MMDeploy master for GPU devices successfully!" ; else echo "Built MMDeploy version v${VERSION} for GPU devices successfully!" ; fi
104+
if [ -z ${VERSION} ] ; then echo "Built MMDeploy dev-1.x for GPU devices successfully!" ; else echo "Built MMDeploy version v${VERSION} for GPU devices successfully!" ; fi
105105

106106
ENV LD_LIBRARY_PATH="/root/workspace/mmdeploy/build/lib:${BACKUP_LD_LIBRARY_PATH}"

docs/en/01-how-to-build/linux-x86_64.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=11.1 -c pytorch -c c
7575
export cu_version=cu111 # cuda 11.1
7676
export torch_version=torch1.8
7777
pip install -U openmim
78-
mim install "mmcv>=2.0.0rc1"
78+
mim install mmengine
79+
mim install "mmcv>=2.0.0rc2"
7980
</code></pre>
8081
</td>
8182
</tr>
@@ -326,7 +327,7 @@ Please check [cmake build option](cmake_option.md).
326327

327328
```bash
328329
cd ${MMDEPLOY_DIR}
329-
pip install -e .
330+
mim install -e .
330331
```
331332

332333
**Note**

docs/en/01-how-to-build/macos-arm64.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Please refer to [get_started](../get_started.md) to install conda.
3737
# install pytorch & mmcv
3838
conda install pytorch==1.9.0 torchvision==0.10.0 -c pytorch
3939
pip install -U openmim
40-
mim install "mmcv>=2.0.0rc1"
40+
mim install mmengine
41+
mim install "mmcv>=2.0.0rc2"
4142
```
4243

4344
### Install Dependencies for SDK
@@ -146,7 +147,7 @@ conda install grpcio
146147

147148
```bash
148149
cd ${MMDEPLOY_DIR}
149-
pip install -v -e .
150+
mim install -v -e .
150151
```
151152

152153
**Note**

docs/en/get_started.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ We recommend that users follow our best practices installing MMDeploy.
6464

6565
```shell
6666
pip install -U openmim
67+
mim install mmengine
6768
mim install "mmcv>=2.0.0rc2"
6869
```
6970

@@ -172,12 +173,12 @@ Based on the above settings, we provide an example to convert the Faster R-CNN i
172173

173174
```shell
174175
# clone mmdeploy to get the deployment config. `--recursive` is not necessary
175-
git clone https://github.com/open-mmlab/mmdeploy.git
176+
git clone -b dev-1.x https://github.com/open-mmlab/mmdeploy.git
176177

177178
# clone mmdetection repo. We have to use the config file to build PyTorch nn module
178-
git clone https://github.com/open-mmlab/mmdetection.git
179+
git clone -b 3.x https://github.com/open-mmlab/mmdetection.git
179180
cd mmdetection
180-
pip install -v -e .
181+
mim install -v -e .
181182
cd ..
182183

183184
# download Faster R-CNN checkpoint
@@ -186,7 +187,7 @@ wget -P checkpoints https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/
186187
# run the command to start model conversion
187188
python mmdeploy/tools/deploy.py \
188189
mmdeploy/configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \
189-
mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \
190+
mmdetection/configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py \
190191
checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
191192
mmdetection/demo/demo.jpg \
192193
--work-dir mmdeploy_model/faster-rcnn \
@@ -201,7 +202,7 @@ For more details about model conversion, you can read [how_to_convert_model](02-
201202

202203
```{tip}
203204
If MMDeploy-ONNXRuntime prebuilt package is installed, you can convert the above model to onnx model and perform ONNX Runtime inference
204-
just by 'changing detection_tensorrt_dynamic-320x320-1344x1344.py' to 'detection_onnxruntime_dynamic.py' and making '--device' as 'cpu'.
205+
just by changing 'detection_tensorrt_dynamic-320x320-1344x1344.py' to 'detection_onnxruntime_dynamic.py' and making '--device' as 'cpu'.
205206
```
206207

207208
## Inference Model

docs/zh_cn/01-how-to-build/linux-x86_64.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=11.1 -c pytorch -c c
7676
export cu_version=cu111 # cuda 11.1
7777
export torch_version=torch1.8
7878
pip install -U openmim
79-
mim install "mmcv>=2.0.0rc1"
79+
mim install mmengine
80+
mim install "mmcv>=2.0.0rc2"
8081
</code></pre>
8182
</td>
8283
</tr>
@@ -323,7 +324,7 @@ export MMDEPLOY_DIR=$(pwd)
323324

324325
```bash
325326
cd ${MMDEPLOY_DIR}
326-
pip install -e .
327+
mim install -e .
327328
```
328329

329330
**注意**

docs/zh_cn/01-how-to-build/macos-arm64.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
# install pytoch & mmcv
4141
conda install pytorch==1.9.0 torchvision==0.10.0 -c pytorch
4242
pip install -U openmim
43-
mim install "mmcv>=2.0.0rc1"
43+
mim install mmengine
44+
mim install "mmcv>=2.0.0rc2"
4445
```
4546

4647
#### 安装 MMDeploy SDK 依赖
@@ -147,7 +148,7 @@ conda install grpcio
147148

148149
```bash
149150
cd ${MMDEPLOY_DIR}
150-
pip install -v -e .
151+
mim install -v -e .
151152
```
152153

153154
**注意**

docs/zh_cn/get_started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ export LD_LIBRARY_PATH=$CUDNN_DIR/lib64:$LD_LIBRARY_PATH
167167
[MMDetection](https://github.com/open-mmlab/mmdetection) 中的 `Faster R-CNN` 为例,我们可以使用如下命令,将 PyTorch 模型转换为 TenorRT 模型,从而部署到 NVIDIA GPU 上.
168168

169169
```shell
170-
# 克隆 mmdeploy 仓库。转换时,需要使用 mmdeploy 仓库中的配置文件,建立转换流水线
171-
git clone --recursive https://github.com/open-mmlab/mmdeploy.git
170+
# 克隆 mmdeploy 仓库。转换时,需要使用 mmdeploy 仓库中的配置文件,建立转换流水线, `--recursive` 不是必须的
171+
git clone -b dev-1.x --recursive https://github.com/open-mmlab/mmdeploy.git
172172

173173
# 安装 mmdetection。转换时,需要使用 mmdetection 仓库中的模型配置文件,构建 PyTorch nn module
174-
git clone https://github.com/open-mmlab/mmdetection.git
174+
git clone -b 3.x https://github.com/open-mmlab/mmdetection.git
175175
cd mmdetection
176-
pip install -v -e .
176+
mim install -v -e .
177177
cd ..
178178

179179
# 下载 Faster R-CNN 模型权重
@@ -182,7 +182,7 @@ wget -P checkpoints https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/
182182
# 执行转换命令,实现端到端的转换
183183
python mmdeploy/tools/deploy.py \
184184
mmdeploy/configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \
185-
mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \
185+
mmdetection/configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py \
186186
checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
187187
mmdetection/demo/demo.jpg \
188188
--work-dir mmdeploy_model/faster-rcnn \

0 commit comments

Comments
 (0)