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

相关推荐
nashane5 分钟前
HarmonyOS 6学习:Web组件同层渲染事件处理与智能长截图实现
前端·学习·harmonyos·harmonyos 5
nashane25 分钟前
HarmonyOS 6学习:Web组件同层渲染触摸事件与长截图拼接实战
前端·学习·harmonyos·harmonyos 5
哆哆啦001 小时前
使用 Obsidian + GitHub Actions + GitHub Pages 搭建内容发布流
数据库·笔记·github·obsidian
stars-he1 小时前
基于 Python 的 DTMF 双音多频信号识别实验
学习·dsp开发
wuxinyan1232 小时前
工业级大模型学习之路012:RAG 零基础入门教程(第七篇):高级检索架构(解决分块不合理问题)
人工智能·学习·rag
xuhaoyu_cpp_java3 小时前
SpringMVC学习(五)
java·开发语言·经验分享·笔记·学习·spring
炽烈小老头3 小时前
【每天学习一点算法 2026/05/15】被围绕的区域
学习·算法·深度优先
中屹指纹浏览器3 小时前
2026平台集群式风控溯源体系研究与浏览器环境适配应对方案
经验分享·笔记
秋雨梧桐叶落莳3 小时前
iOS——ZARA仿写项目
学习·macos·ios·objective-c·cocoa
KKei16383 小时前
Flutter for OpenHarmony 学习视频播放器技术文章
学习·flutter·华为·音视频·harmonyos