编译带 tensorrt 的 onnxruntime

在一个干净的docker环境(ubuntu16.04)中编译带 tensorrt 的 onnxruntime:

过程:

# 先 build 出 wheel
root@4ab06d738053:/tools/onnxruntime# ./build.sh \
	--parallel 8 \
	--use_cuda \
	--cuda_version=11.1 \
	--cuda_home=/usr/local/cuda \
	--cudnn_home=/usr/local/cuda \
	--use_tensorrt --tensorrt_home=/usr/local/lib/python3.8/dist-packages/tensorrt \
	--build_shared_lib --enable_pybind \
	--build_wheel --update --build \
	--config Release

# 安装 wheel
root@4ab06d738053:/tools/onnxruntime# pip install build/Linux/Release/dist/onnxruntime_gpu_tensorrt-1.7.0-cp38-cp38-linux_x86_64.whl

# 查看结果,如果 import onnxruntime 有错误,要卸载 onnxruntime-gpu
root@4ab06d738053:/tools/onnxruntime# pip list | grep onnxruntime
onnxruntime-gpu          1.7.0
onnxruntime-gpu-tensorrt 1.7.0


出现的问题:

1、缺少 git 。

root@a42b2c92c7f3:/# git clone --recursive https://g
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值