update
This commit is contained in:
36
README.md
36
README.md
@@ -1,2 +1,36 @@
|
||||
# enginex-mlu370-vc
|
||||
# enginex-ascend-910-vc-cnn
|
||||
|
||||
运行于【寒武纪】系列算力卡的【视觉分类】引擎,基于 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生成镜像
|
||||
从仓库的【软件包】栏目下载基础镜像 combricon-mlu370x4-base:v0.2.0-tgiv1.4.3-btv0.6.0-pt2.1-x86_64-ubuntu22.04-py310
|
||||
使用 Dockerfile_mlu370 生成 镜像
|
||||
```python
|
||||
docker build -f Dockerfile_mlu370 -t combricon-mlu370x4-base-zhoushasha:v4.0 .
|
||||
```
|
||||
注意 Dockerfile_mlu370 中已预先将模型 microsoft_beit_base_patch16_224_pt22k_ft22k 放在了 /model 下面
|
||||
|
||||
3、启动docker
|
||||
```python
|
||||
docker run -it \
|
||||
-p 10091:80 \
|
||||
--privileged \
|
||||
--name test_mlu370 \
|
||||
--device /dev/cambricon_ctl \
|
||||
--device /dev/cambricon[0-3] \
|
||||
-v /usr/bin/cnmon:/usr/bin/cnmon \
|
||||
combricon-mlu370x4-base-zhoushasha:v4.0
|
||||
```
|
||||
|
||||
4、测试服务
|
||||
```python
|
||||
curl -X POST http://localhost:10091/v1/private/s782b4996 \
|
||||
> -F "image=@/home/zhoushasha/models/026_0010.jpg"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user