Skip to content

Commit

Permalink
Fix ONNX Runtime version to rel-0.5.0 and modify files according to it (
Browse files Browse the repository at this point in the history
  • Loading branch information
GuanLuo authored and deadeyegoodwin committed Aug 6, 2019
1 parent 5efca2c commit 4bc765a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion src/backends/onnx/loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once

#include <core/session/onnxruntime_c_api.h>
#include <onnxruntime_c_api.h>
#include "src/core/status.h"

namespace nvidia { namespace inferenceserver {
Expand Down
2 changes: 1 addition & 1 deletion src/backends/onnx/onnx_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "src/core/server_status.h"

#ifdef TRTIS_ENABLE_GPU
#include <core/providers/cuda/cuda_provider_factory.h>
#include <cuda_provider_factory.h>
#include <cuda_runtime_api.h>
#endif // TRTIS_ENABLE_GPU

Expand Down
2 changes: 1 addition & 1 deletion src/backends/onnx/onnx_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once

#include <core/session/onnxruntime_c_api.h>
#include <onnxruntime_c_api.h>
#include "src/core/backend.h"
#include "src/core/model_config.pb.h"
#include "src/core/scheduler.h"
Expand Down
2 changes: 1 addition & 1 deletion src/backends/onnx/onnx_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#pragma once

#include <core/session/onnxruntime_c_api.h>
#include <onnxruntime_c_api.h>
#include "src/core/model_config.h"
#include "src/core/status.h"

Expand Down

0 comments on commit 4bc765a

Please sign in to comment.