Triton_server部署学习笔记

下载镜像

docker pill http://nvcr.io/nvidia/tritonserver:22.07-py3

docker run --gpus all -itd -p8000:8000 -p8001:8001 -p8002:8002 -v /home/ai-developer/server/docs/examples/model_repository/:/models nvcr.io/nvidia/tritonserver:22.07-py3

docker exec -it a5bc bash

tritonserver --model-repository=/models --strict-model-config=false



非必要config文件

支持的格式有TrnsorRT,TensorFLOW saved-model,ONNX models do not require config.pbtxt when --strict-model-config=false

config中,platfrom可填写Tensorrt_plan,onnxruntime_onnx,pytorch_libtorch

backend tensorrt,onnxruntime,pytorch

dims: [ 3,-1,-1 ] -1代表可变维度

--model-control-model explicit

git clone https://github.com/NVIDIA/DeepLearningExamples.git

cd data/squad/

下载数据集

sh squad_download.sh

模型映射文件地址

cd /models

下载演示模型的地址

https://catalog.ngc.nvidia.com/orgs/nvidia/models/bert_pyt_ckpt_large_qa_squad11_amp

#粘贴wget命令

wget --content-disposition https://api.ngc.nvidia.com/v2/models/nvidia/bert_pyt_ckpt_large_qa_squad11_amp/versions/19.09.0/zip -O bert_pyt_ckpt_large_qa_squad11_amp_19.09.0.zip

转换格式

python3 triton/export_model.py

--input-path triton/model.py

--input-type pyt

--output-path $/models/exported_model.onnx

--output-type onnx

--dataloader triton/dataloader.py

--ignore-unknown-parameters

--onnx-opset 13

${FLAG}

--config-file bert_configs/large.json

--checkpoint /models/bert_large_qa.pt

--precision fp16

--vocab-file /models/vocab.txt

--max-seq-length 34

--predict-file /opt/tritonserver/DeepLearningExamples/PyTorch/LanguageModeling/BERT/data/squad/v1.1/dev-v1.1.json

--batch-size 16

相关推荐
diablobaal29 分钟前
云计算学习100天-第21天
学习
翻滚的小@强2 小时前
数据挖掘笔记:点到线段的距离计算
人工智能·笔记·数据挖掘
会思考的猴子2 小时前
UE5 PCG 笔记(二) Difference 节点
笔记·ue5
yuxb732 小时前
Linux 文本处理与 Shell 编程笔记:正则表达式、sed、awk 与变量脚本
linux·笔记·正则表达式
饕餮争锋5 小时前
设计模式笔记_行为型_访问者模式
笔记·设计模式·访问者模式
不羁。。7 小时前
【撸靶笔记】第七关:GET - Dump into outfile - String
数据库·笔记·oracle
好望角雾眠12 小时前
第一阶段C#基础-10:集合(Arraylist,list,Dictionary等)
笔记·学习·c#
艾伦~耶格尔12 小时前
【集合框架LinkedList底层添加元素机制】
java·开发语言·学习·面试
星仔编程12 小时前
python学习DAY46打卡
学习
大霞上仙13 小时前
实现自学习系统,输入excel文件,能学习后进行相应回答
python·学习·excel