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

相关推荐
星期五不见面几秒前
嵌入式学习!(一)C++学习-STL(21)-26/1/27
开发语言·c++·学习
知识分享小能手1 分钟前
Oracle 19c入门学习教程,从入门到精通,Oracle系统调优 —— 内存结构与参数优化详解(15)
数据库·学习·oracle
weixin_440730502 分钟前
04python编程笔记-06文件+07异常+08模块导入+09unittest框架
笔记·python
??(lxy)3 分钟前
GIT使用学习
git·学习
小龙报4 分钟前
【SOLIDWORKS 练习题】草图专题:3.机械臂
笔记·单片机·嵌入式硬件·物联网·开源·硬件工程·材料工程
im_AMBER5 分钟前
Leetcode 108 交换链表中的节点
数据结构·笔记·学习·算法·leetcode·链表
再卷还是菜9 分钟前
网安渗透学习小结--sql注入
数据库·sql·学习
LaoZhangGong12314 分钟前
学习TCP/IP的第8步:紧急数据
网络·stm32·单片机·学习·tcp/ip·以太网
求真求知的糖葫芦16 分钟前
微波工程4.3节散射矩阵(S参数矩阵)学习笔记(上)(自用)
笔记·学习·矩阵·射频工程
近津薪荼1 小时前
优选算法——双指针4(单调性)
c++·学习·算法