onnxruntime/dockerfiles/Dockerfile.ngraph

26 lines
1.1 KiB
Text
Raw Normal View History

#-------------------------------------------------------------------------
# Copyright(C) 2019 Intel Corporation.
# Licensed under the MIT License.
#--------------------------------------------------------------------------
FROM ubuntu:16.04
2019-04-24 17:35:26 +00:00
ARG PYTHON_VERSION=3.5
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG ONNXRUNTIME_SERVER_BRANCH=master
2019-04-24 17:35:26 +00:00
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
2019-04-24 17:35:26 +00:00
apt-get install -y sudo git bash
2019-04-24 17:35:26 +00:00
ENV PATH="/opt/cmake/bin:${PATH}"
RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime
2019-04-24 17:35:26 +00:00
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
WORKDIR /
RUN mkdir -p /onnxruntime/build && \
python3 /onnxruntime/tools/ci_build/build.py --build_dir /onnxruntime/build --config Release --build_shared_lib --skip_submodule_sync --build_wheel --parallel --use_ngraph && \
pip3 install /onnxruntime/build/Release/dist/onnxruntime_ngraph-*.whl && \
rm -rf /onnxruntime