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

相关推荐
宇钶宇夕4 分钟前
CoDeSys入门实战一起学习(二十八):(ST)三台电机顺起逆停程序详解
运维·学习·自动化·软件工程
£漫步 云端彡4 分钟前
Golang学习历程【第十篇 方法(method)与接收者】
开发语言·学习·golang
im_AMBER24 分钟前
Leetcode 111 两数相加
javascript·笔记·学习·算法·leetcode
驭渊的小故事35 分钟前
类和对象的笔记3
笔记
四谎真好看1 小时前
JavaWeb学习笔记(Day12)
笔记·学习·学习笔记·javaweb
阿蒙Amon1 小时前
TypeScript学习-第11章:配置文件(tsconfig.json)
学习·typescript·json
babe小鑫1 小时前
中专学历转内容运营分析的学习路径
学习·产品运营·内容运营
●VON1 小时前
React Native for OpenHarmony:贪吃蛇游戏的开发与跨平台适配实践
学习·react native·react.js·游戏·openharmony
妄汐霜3 小时前
小白学习笔记(javaweb前端三大件)
笔记·学习·web
tb_first3 小时前
万字超详细苍穹外卖学习笔记5
java·数据库·spring boot·笔记·学习·spring