diff --git a/Dockerfile b/Dockerfile index b19bc293a6..e4f03055d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -99,16 +99,13 @@ FROM ${BASE_IMAGE} AS trtserver_onnx # needs to be built from source # Onnx Runtime release version -ARG ONNX_RUNTIME_VERSION=0.4.0 +ARG ONNX_RUNTIME_VERSION=0.5.0 # Get release version of Onnx Runtime WORKDIR /workspace RUN apt-get update && apt-get install -y --no-install-recommends git -# Check out stable commit on master until new release -# to support cloud-based filesystems -RUN git clone --recursive https://github.com/Microsoft/onnxruntime && \ - (cd onnxruntime && git checkout 2f698bd54b713bb87dbd0bbb913e94bcf7fd480c) +RUN git clone -b rel-${ONNX_RUNTIME_VERSION} --recursive https://github.com/Microsoft/onnxruntime ENV PATH="/opt/cmake/bin:${PATH}" ARG SCRIPT_DIR=/workspace/onnxruntime/tools/ci_build/github/linux/docker/scripts @@ -234,8 +231,14 @@ COPY --from=trtserver_caffe2 /opt/conda/lib/python3.6/site-packages/torch/lib/li /opt/tensorrtserver/lib/ # Onnx Runtime headers and library -ARG ONNX_RUNTIME_VERSION=0.4.0 -COPY --from=trtserver_onnx /workspace/onnxruntime/include/onnxruntime \ +# Put include files to same directory as ONNX Runtime changed the include path +# https://github.com/microsoft/onnxruntime/pull/1461 +ARG ONNX_RUNTIME_VERSION=0.5.0 +COPY --from=trtserver_onnx /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h \ + /opt/tensorrtserver/include/onnxruntime/ +COPY --from=trtserver_onnx /workspace/onnxruntime/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h \ + /opt/tensorrtserver/include/onnxruntime/ +COPY --from=trtserver_onnx /workspace/onnxruntime/include/onnxruntime/core/providers/cuda/cuda_provider_factory.h \ /opt/tensorrtserver/include/onnxruntime/ COPY --from=trtserver_onnx /workspace/build/Release/libonnxruntime.so.${ONNX_RUNTIME_VERSION} \ /opt/tensorrtserver/lib/ diff --git a/src/backends/onnx/loader.h b/src/backends/onnx/loader.h index 84200f55f5..c8cc5be95f 100644 --- a/src/backends/onnx/loader.h +++ b/src/backends/onnx/loader.h @@ -25,7 +25,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include +#include #include "src/core/status.h" namespace nvidia { namespace inferenceserver { diff --git a/src/backends/onnx/onnx_backend.cc b/src/backends/onnx/onnx_backend.cc index 5473c59e38..fd4f0de85a 100644 --- a/src/backends/onnx/onnx_backend.cc +++ b/src/backends/onnx/onnx_backend.cc @@ -38,7 +38,7 @@ #include "src/core/server_status.h" #ifdef TRTIS_ENABLE_GPU -#include +#include #include #endif // TRTIS_ENABLE_GPU diff --git a/src/backends/onnx/onnx_backend.h b/src/backends/onnx/onnx_backend.h index bc4d03f360..513b517c8b 100644 --- a/src/backends/onnx/onnx_backend.h +++ b/src/backends/onnx/onnx_backend.h @@ -25,7 +25,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once -#include +#include #include "src/core/backend.h" #include "src/core/model_config.pb.h" #include "src/core/scheduler.h" diff --git a/src/backends/onnx/onnx_utils.h b/src/backends/onnx/onnx_utils.h index cda3759674..934ba63bdc 100644 --- a/src/backends/onnx/onnx_utils.h +++ b/src/backends/onnx/onnx_utils.h @@ -26,7 +26,7 @@ #pragma once -#include +#include #include "src/core/model_config.h" #include "src/core/status.h"