mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
* add grpc * add-submodule * Revert "add-submodule" This reverts commit e35994b25035ce310a98909658582bff759ee358. * fix submodule * IT BUILDS * Initial commit of prediction_service_impl.cpp * Server builds and runs! * add request id, health and reflection. GRPC is done * enable channelz for monitoring * GRPC unit tests * clang format * add unit tests * Add function tests for GRPC * add grpc to model_zoo_tests * revert update protobuf to 3.7.0 * update submodules * builds but runs some gflags tests which fail * get build working * confine build changes to onnxruntime_server.cmake * update build files * code reveiw comments * Maik's code review comments * update cares version to fix compilation issue * update build to fix c-ares * code review comments * update cgmanifest.json * remove extraneous file * Klein comments. * update ci based on discussions for go dependency * fix tag issue * fix build issues * remove stray submodule * update dockerfile and build script * dynamic linking changes * update build script * code review comments * update dockerfile * update script for mount * code review comments
40 lines
1.8 KiB
Text
40 lines
1.8 KiB
Text
#-------------------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
#--------------------------------------------------------------------------
|
|
# Official docker container for ONNX Runtime Server
|
|
# Ubuntu 16.04, CPU version, Python 3.
|
|
#--------------------------------------------------------------------------
|
|
|
|
FROM ubuntu:16.04 AS minimal
|
|
MAINTAINER Harry Yang "huayang@microsoft.com"
|
|
|
|
FROM ubuntu:16.04 AS build
|
|
ARG PYTHON_VERSION=3.5
|
|
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
|
|
ARG ONNXRUNTIME_SERVER_BRANCH=master
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y sudo git bash
|
|
|
|
ENV PATH="/opt/cmake/bin:${PATH}"
|
|
RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime
|
|
RUN /onnxruntime/tools/ci_build/github/linux/docker/scripts/install_ubuntu.sh -p ${PYTHON_VERSION} && \
|
|
/onnxruntime/tools/ci_build/github/linux/docker/scripts/install_deps.sh && \
|
|
/onnxruntime/tools/ci_build/github/linux/docker/scripts/install_server_deps.sh
|
|
|
|
ENV PATH="/usr/local/go/bin:${PATH}"
|
|
|
|
WORKDIR /
|
|
RUN mkdir -p /onnxruntime/build && \
|
|
python3 /onnxruntime/tools/ci_build/build.py --build_dir /onnxruntime/build --config Release --build_server --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
|
|
|
|
FROM minimal AS final
|
|
WORKDIR /onnxruntime/server/
|
|
ENV MODEL_ABSOLUTE_PATH /onnxruntime/model/model.onnx
|
|
COPY --from=build /onnxruntime/build/Release/onnxruntime_server /onnxruntime/server/
|
|
COPY --from=build /onnxruntime/build/Release/libonnxruntime.so.* /lib/
|
|
RUN apt-get update \
|
|
&& apt-get install -y libgomp1
|
|
ENTRYPOINT /onnxruntime/server/onnxruntime_server --model_path $MODEL_ABSOLUTE_PATH
|