mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
update ngraph dockerfile. add python lib location to LD_LIBRARY_PATH for cuda/tensorrt Dockerfiles. (#2330)
This commit is contained in:
parent
ace19129b9
commit
06a6d74a67
3 changed files with 14 additions and 10 deletions
|
|
@ -16,6 +16,7 @@ RUN apt-get update &&\
|
|||
|
||||
WORKDIR /code
|
||||
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:/opt/miniconda/bin:${PATH}
|
||||
ENV LD_LIBRARY_PATH /opt/miniconda/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# Prepare onnxruntime repository & build onnxruntime with CUDA
|
||||
RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
FROM ubuntu:16.04
|
||||
|
||||
ARG PYTHON_VERSION=3.5
|
||||
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
|
||||
ARG ONNXRUNTIME_SERVER_BRANCH=master
|
||||
|
||||
|
|
@ -14,13 +13,16 @@ 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 -p ${PYTHON_VERSION}
|
||||
ENV PATH /opt/miniconda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:$PATH
|
||||
ENV LD_LIBRARY_PATH=/opt/miniconda/lib:$LD_LIBRARY_PATH
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
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
|
||||
WORKDIR /code
|
||||
RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
|
||||
cp onnxruntime/docs/Privacy.md /code/Privacy.md && \
|
||||
cp onnxruntime/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt && \
|
||||
cp onnxruntime/ThirdPartyNotices.txt /code/ThirdPartyNotices.txt && \
|
||||
/bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh && \
|
||||
onnxruntime/tools/ci_build/github/linux/docker/scripts/install_ubuntu.sh -p 3.5 && \
|
||||
onnxruntime/build.sh --config RelWithDebInfo --update --build --use_ngraph --build_wheel && \
|
||||
pip install onnxruntime/build/Linux/RelWithDebInfo/dist/*-linux_x86_64.whl && rm -rf /code/onnxruntime /code/cmake-3.14.3-Linux-x86_64
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ RUN apt-get update &&\
|
|||
|
||||
WORKDIR /code
|
||||
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:/opt/miniconda/bin:${PATH}
|
||||
ENV LD_LIBRARY_PATH /opt/miniconda/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# Prepare onnxruntime repository & build onnxruntime with TensorRT
|
||||
RUN git clone --single-branch --branch ${ONNXRUNTIME_SERVER_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
|
||||
|
|
|
|||
Loading…
Reference in a new issue