Files
enginex-ascend-910-vc/README.md
2025-09-09 17:17:07 +08:00

46 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# enginex-ascend-910-vc-cnn
运行于【昇腾-910】系列算力卡的【视觉分类】引擎基于 CNN 架构,支持 BEiT、MobileViT 等流行模型
## QuickStart
1、从 modelscope上下载视觉分类的模型例如 microsoft/beit-base-patch16-224
```python
modelscope download --model microsoft/beit-base-patch16-224 README.md --local_dir /mnt/contest_ceph/zhoushasha/models/microsoft/beit_base_patch16_224_pt22k_ft22k
```
2、使用Dockerfile生成镜像
从仓库的【软件包】栏目下载基础镜像 git.modelhub.org.cn:9443/enginex-ascend/quay.io/ascend/vllm-ascend:v0.10.0rc1
使用 Dockerfile_ascend 生成 镜像
```python
docker build -f Dockerfile_ascend -t ascend-my:v3 .
```
注意 Dockerfile_ascend 中已预先将模型 microsoft_beit_base_patch16_224_pt22k_ft22k 放在了 /model 下面
3、启动docker
```python
docker run -it --rm \
-p 10086:80 \
--name test-ascend-my-1 \
-v `pwd`:/host \
-e ASCEND_VISIBLE_DEVICES=1 \
--device /dev/davinci1:/dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /mnt:/mnt \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-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 \
--privileged \
ascend-my:v3
```
4、测试服务
```python
curl -X POST http://localhost:10086/v1/private/s782b4996 \
> -F "image=@/home/zhoushasha/models/026_0010.jpg"
```