update README
This commit is contained in:
18
README.md
18
README.md
@@ -1,2 +1,20 @@
|
||||
# enginex-bi_series-image-classification
|
||||
## Quickstart
|
||||
### 启动服务
|
||||
修改docker.sh的脚本中$mountpath为本地的模型挂载路径
|
||||
然后运行./docker.sh
|
||||
当打印出以下内容时表示模型load成功
|
||||
```
|
||||
2026-04-08 06:22:55 /workspace/transformers_server.py INFO model loaded successfully
|
||||
INFO: Application startup complete.
|
||||
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
### 运行测试
|
||||
执行 python3 test.py
|
||||
打印出以下内容, 图片分类的top5 labels:
|
||||
```
|
||||
status_code: 200
|
||||
response:
|
||||
{"labels":[282,281,761,285,612]}
|
||||
```
|
||||
|
||||
@@ -3,4 +3,4 @@ docker rm bi150_ic
|
||||
|
||||
docker build . -t bi150_image_classification
|
||||
|
||||
docker run -p 17777:8000 -v /mnt/contest_ceph/aiyueqi/image_classification/microsoft/resnet-50/:/model:ro -it --device=/dev/iluvatar0:/dev/iluvatar0 --name bi150_ic -e CONFIG_JSON='{"model_class": "AutoModelForImageClassification", "processer": "AutoImageProcessor", "torch_dtype": "auto"}' bi150_image_classification
|
||||
docker run -p 17777:8000 -v /$mountpath/:/model:ro -it --device=/dev/iluvatar0:/dev/iluvatar0 --name bi150_ic -e CONFIG_JSON='{"model_class": "AutoModelForImageClassification", "processer": "AutoImageProcessor", "torch_dtype": "auto"}' bi150_image_classification
|
||||
|
||||
Reference in New Issue
Block a user