|
1 | 1 | <!--
|
2 |
| -# Copyright 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# Copyright 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
3 | 3 | #
|
4 | 4 | # Redistribution and use in source and binary forms, with or without
|
5 | 5 | # modification, are permitted provided that the following conditions
|
|
28 | 28 |
|
29 | 29 | # Triton Inference Server Support for Jetson and JetPack
|
30 | 30 |
|
31 |
| -Triton Inference Server is officially supported on JetPack starting from JetPack 4.6. Triton Inference Server on Jetson supports trained AI models from multiple frameworks includings NVIDIA TensorRT, TensorFlow and ONNX Runtime. |
32 |
| - |
33 |
| -On JetPack, although HTTP/REST and GRPC inference protocols are supported, for edge use cases, direct [C API integration](inference_protocols.md#c-api) is recommended. |
| 31 | +A release of Triton for [JetPack 4.6.1](https://developer.nvidia.com/embedded/jetpack) |
| 32 | +is provided in the attached tar file in the [release notes](https://github.com/triton-inference-server/server/releases). |
34 | 33 |
|
35 | 34 | 
|
36 | 35 |
|
37 | 36 | Triton Inference Server support on JetPack includes:
|
38 | 37 |
|
39 | 38 | * Running models on GPU and NVDLA
|
40 |
| -* Support for multiple frameworks: TensorRT, TensorFlow and ONNX Runtime. |
41 | 39 | * [Concurrent model execution](architecture.md#concurrent-model-execution)
|
42 | 40 | * [Dynamic batching](architecture.md#models-and-schedulers)
|
43 | 41 | * [Model pipelines](architecture.md#ensemble-models)
|
44 | 42 | * [Extensible backends](https://github.com/triton-inference-server/backend)
|
45 | 43 | * [HTTP/REST and GRPC inference protocols](inference_protocols.md)
|
46 | 44 | * [C API](inference_protocols.md#c-api)
|
47 | 45 |
|
48 |
| -You can download the `.tar` files for Jetson published on the Triton Infence Server [release page](https://github.com/triton-inference-server/server/releases) in _"Jetson JetPack Support"_ section. The `.tar` file contains the Triton executables and shared libraries, as well as the C++ and Python client libraries and examples. |
| 46 | +Limitations on Jetson/JetPack: |
| 47 | + |
| 48 | +* Onnx Runtime backend does not support the OpenVino execution provider. |
| 49 | +The TensorRT execution provider however is supported. |
| 50 | +* The Python backend does not support GPU Tensors and Async BLS. |
| 51 | +* CUDA IPC (shared memory) is not supported. System shared memory however is supported. |
| 52 | +* GPU metrics, GCS storage, S3 storage and Azure storage are not supported. |
| 53 | + |
| 54 | +On JetPack, although HTTP/REST and GRPC inference protocols are supported, for edge |
| 55 | +use cases, direct [C API integration](inference_protocols.md#c-api) is recommended. |
| 56 | + |
| 57 | +You can download the `.tar` files for Jetson from the Triton Inference Server |
| 58 | +[release page](https://github.com/triton-inference-server/server/releases) in the |
| 59 | +_"Jetson JetPack Support"_ section. |
| 60 | + |
| 61 | +The `.tar` file contains the Triton server executable and shared libraries, |
| 62 | +as well as the C++ and Python client libraries and examples. |
| 63 | + |
| 64 | +## Installation and Usage |
| 65 | + |
| 66 | +The following dependencies must be installed before building / running Triton server: |
| 67 | + |
| 68 | +``` |
| 69 | +apt-get update && \ |
| 70 | + apt-get install -y --no-install-recommends \ |
| 71 | + software-properties-common \ |
| 72 | + autoconf \ |
| 73 | + automake \ |
| 74 | + build-essential \ |
| 75 | + git \ |
| 76 | + libb64-dev \ |
| 77 | + libre2-dev \ |
| 78 | + libssl-dev \ |
| 79 | + libtool \ |
| 80 | + libboost-dev \ |
| 81 | + rapidjson-dev \ |
| 82 | + patchelf \ |
| 83 | + pkg-config \ |
| 84 | + libopenblas-dev \ |
| 85 | + libarchive-dev \ |
| 86 | + zlib1g-dev \ |
| 87 | + python3 \ |
| 88 | + python3-pip \ |
| 89 | + python3-dev |
| 90 | +``` |
| 91 | + |
| 92 | +Additional PyTorch dependencies: |
| 93 | + |
| 94 | +``` |
| 95 | +apt-get -y install autoconf \ |
| 96 | + bc \ |
| 97 | + g++-8 \ |
| 98 | + gcc-8 \ |
| 99 | + clang-8 \ |
| 100 | + lld-8 |
| 101 | +
|
| 102 | +pip3 install --upgrade expecttest xmlrunner hypothesis aiohttp pyyaml scipy ninja typing_extensions protobuf |
| 103 | +``` |
| 104 | + |
| 105 | +In addition to the above Pytorch dependencies, the PyTorch wheel corresponding to this release must also be installed: |
| 106 | + |
| 107 | +``` |
| 108 | +pip3 install --upgrade https://developer.download.nvidia.com/compute/redist/jp/v461/pytorch/torch-1.11.0a0+17540c5-cp36-cp36m-linux_aarch64.whl |
| 109 | +``` |
| 110 | + |
| 111 | +**Note**: The PyTorch backend depends on libomp.so, which is not loaded automatically. |
| 112 | +If using the PyTorch backend in Triton, you need to set the LD_LIBRARY_PATH to allow |
| 113 | +libomp.so to be loaded as needed before launching Triton. |
| 114 | + |
| 115 | +``` |
| 116 | +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/llvm-8/lib" |
| 117 | +``` |
| 118 | + |
| 119 | +**Note**: When building Triton on Jetson, you will require a recent version of cmake. |
| 120 | +We recommend using cmake 3.21.0. Below is a script to upgrade your cmake version to 3.21.0. |
| 121 | + |
| 122 | +``` |
| 123 | +apt remove cmake |
| 124 | +wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \ |
| 125 | + gpg --dearmor - | \ |
| 126 | + tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ |
| 127 | + apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \ |
| 128 | + apt-get update && \ |
| 129 | + apt-get install -y --no-install-recommends \ |
| 130 | + cmake-data=3.21.0-0kitware1ubuntu18.04.1 cmake=3.21.0-0kitware1ubuntu18.04.1 |
| 131 | +``` |
| 132 | + |
| 133 | +**Note**: Seeing a core dump when using numpy 1.19.5 on Jetson is a [known issue](https://github.com/numpy/numpy/issues/18131). |
| 134 | +We recommend using numpy version 1.19.4 or earlier to work around this issue. |
| 135 | + |
| 136 | +To build / run the Triton client libraries and examples on Jetson, the following dependencies must also be installed. |
| 137 | + |
| 138 | +``` |
| 139 | +apt-get install -y --no-install-recommends \ |
| 140 | + curl \ |
| 141 | + jq |
| 142 | +
|
| 143 | + pip3 install --upgrade wheel setuptools cython && \ |
| 144 | + pip3 install --upgrade grpcio-tools numpy==1.19.4 future attrdict |
| 145 | + pip3 install --upgrade six requests flake8 flatbuffers pillow |
| 146 | +``` |
| 147 | + |
| 148 | +**Note**: OpenCV 4.1.1 is installed as a part of JetPack. It is one of the dependencies for the client build. |
| 149 | + |
| 150 | +**Note**: On Jetson, the backend directory must be explicitly specified using the |
| 151 | +`--backend-directory` flag. Triton defaults to using TensorFlow 1.x and a version string |
| 152 | +is required to use TensorFlow 2.x. |
| 153 | + |
| 154 | +``` |
| 155 | +tritonserver --model-repository=/path/to/model_repo --backend-directory=/path/to/tritonserver/backends \ |
| 156 | + --backend-config=tensorflow,version=2 |
| 157 | +``` |
49 | 158 |
|
50 |
| -Note that [perf_analyzer](perf_analyzer.md) is supported on Jetson, while the [model_analyzer](model_analyzer.md) is currently not available for Jetson. To execute `perf_analyzer` for C API, include the option `--service-kind=triton_c_api`: |
| 159 | +**Note**: [perf_analyzer](perf_analyzer.md) is supported on Jetson, while the [model_analyzer](model_analyzer.md) |
| 160 | +is currently not available for Jetson. To execute `perf_analyzer` for C API, use |
| 161 | +the CLI flag `--service-kind=triton_c_api`: |
51 | 162 |
|
52 | 163 | ```shell
|
53 |
| -perf_analyzer -m graphdef_int32_int32_int32 --service-kind=triton_c_api --triton-server-directory=/opt/tritonserver --model-repository=/workspace/qa/L0_perf_analyzer_capi/models |
| 164 | +perf_analyzer -m graphdef_int32_int32_int32 --service-kind=triton_c_api \ |
| 165 | + --triton-server-directory=/opt/tritonserver \ |
| 166 | + --model-repository=/workspace/qa/L0_perf_analyzer_capi/models |
54 | 167 | ```
|
55 | 168 |
|
56 | 169 | Refer to these [examples](examples/jetson) that demonstrate how to use Triton Inference Server on Jetson.
|
0 commit comments