Skip to content

Commit

Permalink
fix mermaid markdown rendering issue in readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
lvhan028 committed Jun 29, 2022
1 parent dc5f9c3 commit b5c3bd7
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
'sphinx_markdown_tables',
'myst_parser',
'sphinx_copybutton',
'sphinxcontrib.mermaid'
] # yapf: disable

autodoc_mock_imports = ['tensorrt']
Expand Down
4 changes: 2 additions & 2 deletions docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ cv2.imwrite('output_detection.png', img)
You can find more examples from [here](https://github.com/open-mmlab/mmdeploy/tree/master/demo/python).

```{note}
If you build MMDeploy from the source, please add ${MMDEPLOY_DIR}/build/lib to the environment variable PYTHONPATH.
If you build MMDeploy from source, please add ${MMDEPLOY_DIR}/build/lib to the environment variable PYTHONPATH.
Otherwise, you will run into an error like ’ModuleNotFoundError: No module named 'mmdeploy_python'
```

#### C API

Using SDK C API should follow next pattern,

```mermaid
```{mermaid}
graph LR
A[create inference handle] --> B(read image)
B --> C(apply handle)
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/02-how-to-run/quantize_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

以 ncnn backend 为例,完整的工作流如下:

```mermaid
```{mermaid}
flowchart TD;
torch模型-->非标准onnx;
非标准onnx-->ncnn-fp32;
Expand Down
1 change: 1 addition & 0 deletions docs/zh_cn/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
'sphinx_markdown_tables',
'myst_parser',
'sphinx_copybutton',
'sphinxcontrib.mermaid'
] # yapf: disable

autodoc_mock_imports = ['tensorrt']
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ cv2.imwrite('output_detection.png', img)

使用 C API 进行模型推理的流程符合下面的模式:

```mermaid
```{mermaid}
graph LR
A[创建推理句柄] --> B(读取图像)
B --> C(应用句柄进行推理)
Expand Down
1 change: 1 addition & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ recommonmark
sphinx==4.0.2
sphinx-copybutton
sphinx_markdown_tables
sphinxcontrib-mermaid
1 change: 1 addition & 0 deletions requirements/readthedocs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ h5py
mmcv
onnx>=1.8.0
opencv-python==4.5.4.60
sphinxcontrib-mermaid
torch

0 comments on commit b5c3bd7

Please sign in to comment.