Skip to content

Commit 17de078

Browse files
authored
[Docs] Add dynamic version in docs (#90)
### What this PR does / why we need it? Add dynamic version in docs ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Preview: https://vllm-ascend--90.org.readthedocs.build/en/90/ Signed-off-by: Yikun Jiang <[email protected]>
1 parent c18fb09 commit 17de078

File tree

5 files changed

+35
-18
lines changed

5 files changed

+35
-18
lines changed

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# vLLM Ascend Plugin documents
22

3+
Live doc: https://vllm-ascend.readthedocs.io
4+
35
## Build the docs
46

57
```bash

docs/requirements-docs.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
sphinx==6.2.1
2-
sphinx-argparse==0.4.0
3-
sphinx-book-theme==1.0.1
4-
sphinx-copybutton==0.5.2
5-
sphinx-design==0.6.1
6-
sphinx-togglebutton==0.3.2
7-
myst-parser==3.0.1
1+
sphinx
2+
sphinx-argparse
3+
sphinx-book-theme
4+
sphinx-copybutton
5+
sphinx-design
6+
sphinx-togglebutton
7+
myst-parser
88
msgspec
9+
sphinx-substitution-extensions

docs/source/conf.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,20 @@
5353
"sphinxarg.ext",
5454
"sphinx_design",
5555
"sphinx_togglebutton",
56+
"sphinx_substitution_extensions",
5657
]
57-
myst_enable_extensions = [
58-
"colon_fence",
59-
]
58+
59+
myst_enable_extensions = ["colon_fence", "substitution"]
60+
61+
# Change this when cut down release
62+
myst_substitutions = {
63+
# the branch of vllm, used in vllm clone
64+
# such as 'main', 'v0.7.1'
65+
'vllm_version': 'main',
66+
# the branch of vllm-ascend, used in vllm-ascend clone and image tag
67+
# such as 'main', 'v0.7.1-dev', 'v0.7.1rc1'
68+
'vllm_ascend_version': 'main'
69+
}
6070

6171
# Add any paths that contain templates here, relative to this directory.
6272
templates_path = ['_templates']

docs/source/installation.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ pip install vllm vllm-ascend -f https://download.pytorch.org/whl/torch/
117117

118118
or build from **source code**:
119119

120-
```bash
121-
git clone https://github.com/vllm-project/vllm
120+
```{code-block} bash
121+
:substitutions:
122+
123+
git clone --depth 1 --branch |vllm_version| https://github.com/vllm-project/vllm
122124
cd vllm
123125
VLLM_TARGET_DEVICE=empty pip install . -f https://download.pytorch.org/whl/torch/
124126
125-
git clone https://github.com/vllm-project/vllm-ascend.git
127+
git clone --depth 1 --branch |vllm_ascend_version| https://github.com/vllm-project/vllm-ascend.git
126128
cd vllm-ascend
127129
pip install -e . -f https://download.pytorch.org/whl/torch/
128130
```
@@ -138,7 +140,7 @@ You can just pull the **prebuilt image** and run it with bash.
138140
# Update DEVICE according to your device (/dev/davinci[0-7])
139141
DEVICE=/dev/davinci7
140142
# Update the vllm-ascend image
141-
IMAGE=quay.io/ascend/vllm-ascend:main
143+
IMAGE=quay.io/ascend/vllm-ascend:|vllm_ascend_version|
142144
docker pull $IMAGE
143145
docker run --rm \
144146
--name vllm-ascend-env \

docs/source/quick_start.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,17 @@ pip install --upgrade pip
6969

7070
You can install vLLM and vllm-ascend plugin by using:
7171

72-
```bash
73-
# Install vLLM main branch (About 5 mins)
74-
git clone --depth 1 https://github.com/vllm-project/vllm.git
72+
```{code-block} bash
73+
:substitutions:
74+
75+
# Install vLLM (About 5 mins)
76+
git clone --depth 1 --branch |vllm_version| https://github.com/vllm-project/vllm.git
7577
cd vllm
7678
VLLM_TARGET_DEVICE=empty pip install .
7779
cd ..
7880
7981
# Install vLLM Ascend Plugin:
80-
git clone --depth 1 https://github.com/vllm-project/vllm-ascend.git
82+
git clone --depth 1 --branch |vllm_ascend_version| https://github.com/vllm-project/vllm-ascend.git
8183
cd vllm-ascend
8284
pip install -e .
8385
cd ..

0 commit comments

Comments
 (0)