Skip to content

Add the build of adsbrain backend to build.py #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: r22.05_ab
Choose a base branch
from
11 changes: 10 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ def backend_repo(be):
return 'tensorflow_backend'
if be.startswith("openvino"):
return 'openvino_backend'
if (be == 'adsbrain'):
return 'triton-adsbrain-backend'
return '{}_backend'.format(be)


Expand Down Expand Up @@ -638,7 +640,11 @@ def pytorch_cmake_args(images):
def onnxruntime_cmake_args(images, library_paths):
cargs = [
cmake_backend_arg('onnxruntime', 'TRITON_BUILD_ONNXRUNTIME_VERSION',
None, TRITON_VERSION_MAP[FLAGS.version][2])
None, TRITON_VERSION_MAP[FLAGS.version][2]),
cmake_backend_arg('onnxruntime', 'TRITON_BUILD_CUDA_HOME',
None, "/usr/local/cuda"),
cmake_backend_arg('onnxruntime', 'TRITON_BUILD_CUDNN_HOME',
None, "/usr/local/cuda"),
]

# TRITON_ENABLE_GPU is already set for all backends in backend_cmake_args()
Expand Down Expand Up @@ -2273,6 +2279,7 @@ def enable_all():
if (be in CORE_BACKENDS):
continue

github_organization = FLAGS.github_organization
tagged_be_list = []
if (be == 'openvino'):
tagged_be_list.append(
Expand All @@ -2283,6 +2290,8 @@ def enable_all():
if not skip:
tagged_be_list.append(tagged_backend(be, ver))
skip = False
if (be == 'adsbrain'):
github_organization = 'https://github.com/feihugis'

# If armnn_tflite backend, source from external repo for git clone
if be == 'armnn_tflite':
Expand Down
69 changes: 69 additions & 0 deletions build_adsbrain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

# Note cmake version 3.27.6 works; but cmake version 3.25 will not work.
apt-get update
apt-get install libssl-dev
apt-get install rapidjson-dev
apt-get install libboost-all-dev
apt-get install libarchive-dev
nv-hostengine -t
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb
apt-get install -y datacenter-gpu-manager
apt-get install libre2-dev
apt-get install -y cl-base64
apt-get install -y libb64-dev

rm -rf checksum/
rm -rf cmake_build
rm -rf opt/
rm -rf python
rm -rf tritonserver/
rm -rf onnxruntime

# Build without container
python build.py \
--enable-logging \
--enable-stats \
--enable-tracing \
--enable-metrics \
--enable-gpu-metrics \
--enable-gpu \
--endpoint=http \
--endpoint=adsbrain \
--repo-tag=common:r22.05 \
--repo-tag=core:r22.05 \
--repo-tag=backend:r22.05 \
--repo-tag=thirdparty:r22.05_ab \
--backend=adsbrain:r22.05_ab \
--backend=python:r22.05 \
--backend=onnxruntime:r22.05 \
--repoagent=checksum:r22.05 \
--build-type=Release \
--build-parallel=80 \
--no-container-build \
--build-dir=`pwd` \
--verbose

# Build with container
python build.py \
--enable-logging \
--enable-stats \
--enable-tracing \
--enable-metrics \
--enable-gpu-metrics \
--enable-gpu \
--endpoint=http \
--endpoint=adsbrain \
--repo-tag=common:r22.05 \
--repo-tag=core:r22.05 \
--repo-tag=backend:r22.05 \
--repo-tag=thirdparty:r22.05_ab \
--backend=adsbrain:r22.05_ab \
--backend=python:r22.05 \
--backend=onnxruntime \
--repoagent=checksum:r22.05 \
--build-type=Release \
--build-parallel=80 \
--verbose