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

相关推荐
week_泽2 分钟前
网安基础_1_补充_网络安全渗透测试学习笔记
笔记·学习·web安全
·present·4 分钟前
射频网课学习第八章(低噪声放大器)
学习
盖世灬英雄z6 分钟前
数据结构与算法学习(二)
c++·学习
RisunJan7 分钟前
【族谱】丝连族谱-EXCEL世系图排版教程
学习
航Hang*8 分钟前
Photoshop 图形与图像处理技术——第7章:滤镜的应用
图像处理·笔记·ui·photoshop
嵌入式@秋刀鱼13 分钟前
ROS开发学习记录【一】
linux·c++·笔记·学习
冻伤小鱼干14 分钟前
《自动驾驶与机器人中的slam技术:从理论到实践》笔记——ch7(3)
笔记·机器人·自动驾驶
·present·29 分钟前
射频网课学习第六章(功率增益圆)
学习
·present·31 分钟前
射频网课第三章学习(功率增益设计)
学习
d111111111d1 小时前
STM32 I2C通信详解:从机地址 vs 寄存器地址
笔记·stm32·单片机·嵌入式硬件·学习·模块测试