[Docs] Re-arch on doc and make QwQ doc work (#271)
### What this PR does / why we need it? Re-arch on tutorials, move singe npu / multi npu / multi node to index. - Unifiy docker run cmd - Use dropdown to hide build from source installation doc - Re-arch tutorials to include Qwen/QwQ/DeepSeek - Make QwQ doc works ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI test Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
This commit is contained in:
@@ -44,10 +44,12 @@ Refer to [Ascend Environment Setup Guide](https://ascend.github.io/docs/sources/
|
||||
|
||||
The easiest way to prepare your software environment is using CANN image directly:
|
||||
|
||||
```bash
|
||||
```{code-block} bash
|
||||
:substitutions:
|
||||
# Update DEVICE according to your device (/dev/davinci[0-7])
|
||||
export DEVICE=/dev/davinci7
|
||||
|
||||
# Update the vllm-ascend image
|
||||
export IMAGE=quay.io/ascend/cann:|cann_image_tag|
|
||||
docker run --rm \
|
||||
--name vllm-ascend-env \
|
||||
--device $DEVICE \
|
||||
@@ -59,14 +61,16 @@ docker run --rm \
|
||||
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
|
||||
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
|
||||
-v /etc/ascend_install.info:/etc/ascend_install.info \
|
||||
-it quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py3.10 bash
|
||||
-it $IMAGE bash
|
||||
```
|
||||
|
||||
:::{dropdown} Click here to see "Install CANN manally"
|
||||
:animate: fade-in-slide-down
|
||||
You can also install CANN manually:
|
||||
|
||||
:::{note}
|
||||
```{note}
|
||||
This guide takes aarch64 as an example. If you run on x86, you need to replace `aarch64` with `x86_64` for the package name shown below.
|
||||
:::
|
||||
```
|
||||
|
||||
```bash
|
||||
# Create a virtual environment
|
||||
@@ -94,6 +98,8 @@ chmod +x. /Ascend-cann-nnal_8.0.0_linux-aarch64.run
|
||||
source /usr/local/Ascend/nnal/atb/set_env.sh
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
::::{tab-item} Before using docker
|
||||
@@ -125,6 +131,7 @@ pip install vllm==|pip_vllm_version|
|
||||
pip install vllm-ascend==|pip_vllm_ascend_version| --extra-index https://download.pytorch.org/whl/cpu/
|
||||
```
|
||||
|
||||
:::{dropdown} Click here to see "Build from source code"
|
||||
or build from **source code**:
|
||||
|
||||
```{code-block} bash
|
||||
@@ -140,6 +147,7 @@ git clone --depth 1 --branch |vllm_ascend_version| https://github.com/vllm-proj
|
||||
cd vllm-ascend
|
||||
pip install -e . --extra-index https://download.pytorch.org/whl/cpu/
|
||||
```
|
||||
:::
|
||||
|
||||
Current version depends on a unreleased `torch-npu`, you need to install manually:
|
||||
|
||||
@@ -167,14 +175,23 @@ pip install ./torch_npu-2.5.1.dev20250308-cp310-cp310-manylinux_2_17_aarch64.man
|
||||
|
||||
You can just pull the **prebuilt image** and run it with bash.
|
||||
|
||||
:::{dropdown} Click here to see "Build from Dockerfile"
|
||||
or build IMAGE from **source code**:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/vllm-project/vllm-ascend.git
|
||||
cd vllm-ascend
|
||||
docker build -t vllm-ascend-dev-image:latest -f ./Dockerfile .
|
||||
```
|
||||
:::
|
||||
|
||||
```{code-block} bash
|
||||
:substitutions:
|
||||
|
||||
# Update DEVICE according to your device (/dev/davinci[0-7])
|
||||
DEVICE=/dev/davinci7
|
||||
export DEVICE=/dev/davinci7
|
||||
# Update the vllm-ascend image
|
||||
IMAGE=quay.io/ascend/vllm-ascend:|vllm_ascend_version|
|
||||
docker pull $IMAGE
|
||||
export IMAGE=quay.io/ascend/vllm-ascend:|vllm_ascend_version|
|
||||
docker run --rm \
|
||||
--name vllm-ascend-env \
|
||||
--device $DEVICE \
|
||||
@@ -189,14 +206,6 @@ docker run --rm \
|
||||
-it $IMAGE bash
|
||||
```
|
||||
|
||||
or build IMAGE from **source code**:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/vllm-project/vllm-ascend.git
|
||||
cd vllm-ascend
|
||||
docker build -t vllm-ascend-dev-image:latest -f ./Dockerfile .
|
||||
```
|
||||
|
||||
::::
|
||||
|
||||
:::::
|
||||
|
||||
Reference in New Issue
Block a user