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

相关推荐
1104.北光c°13 分钟前
基于Canal + Kafka的高可用关注系统:一主多从关系链
java·开发语言·笔记·分布式·程序人生·kafka·一主多从
01二进制代码漫游日记16 分钟前
通讯录(一)
c语言·数据结构·学习
江苏世纪龙科技20 分钟前
让汽修课堂“动”起来—哈弗M6汽车故障诊断与排除仿真教学软件
学习
小陈的进阶之路22 分钟前
Pytest 框架与 Fixture 总结
笔记·pytest
CDN36026 分钟前
CSDN 运维笔记|360CDN 高防服务器配置与防护规则
运维·服务器·笔记
吴阿福|一人公司29 分钟前
Claude Code 封号问题及应对方案
笔记
深蓝轨迹39 分钟前
黑马点评-day02-缓存笔记
redis·笔记·缓存·mybatis
小陈phd40 分钟前
多模态大模型学习笔记(二十三)——一文搞懂数虚拟人:从定义、分类到核心技术全景
笔记·学习
糖果店的幽灵40 分钟前
【大模型】大模型学习总结之机器学习-3.模型评估
人工智能·学习·机器学习
Edward111111111 小时前
3月23Math类,Arrays类
java·学习