mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-28 22:56:32 +00:00
### Description Add NPU to list of device supported. Added changes for Support to OV 2024.0 Nuget packages removes packaging of OpenVINO DLL Bug Fixes with Python API Reverted Dockerfiles not being maintained. ### Motivation and Context NPU Device has been introduced by Intel in latest client systems OpenVINO 2024.0 release is out. --------- Co-authored-by: Suryaprakash Shanmugam <suryaprakash.shanmugam@intel.com> Co-authored-by: Preetha Veeramalai <preetha.veeramalai@intel.com> Co-authored-by: Ubuntu <ubuntu@ubuntu-118727.iind.intel.com> Co-authored-by: hmamidix <hemax.sowjanya.mamidi@intel.com> Co-authored-by: vthaniel <vishnudas.thaniel.s@intel.com> Co-authored-by: saurabhkale17 <saurabh1.kale@intel.com>
61 lines
2.3 KiB
Text
61 lines
2.3 KiB
Text
#-------------------------------------------------------------------------
|
|
# Copyright(C) 2021-2024 Intel Corporation.
|
|
# SPDX-License-Identifier: MIT
|
|
#--------------------------------------------------------------------------
|
|
|
|
ARG OPENVINO_VERSION=2024.0.0
|
|
|
|
|
|
# Build stage
|
|
FROM openvino/ubuntu20_runtime:${OPENVINO_VERSION} AS builder
|
|
|
|
ENV WORKDIR_PATH=/home/openvino
|
|
WORKDIR $WORKDIR_PATH
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ARG DEVICE=CPU_FP32
|
|
ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime.git
|
|
ARG ONNXRUNTIME_BRANCH=main
|
|
|
|
ENV OpenVINO_DIR=${INTEL_OPENVINO_DIR}/runtime/cmake
|
|
|
|
USER root
|
|
RUN apt update; apt install -y git protobuf-compiler libprotobuf-dev
|
|
RUN git clone --recursive -b ${ONNXRUNTIME_BRANCH} ${ONNXRUNTIME_REPO}
|
|
RUN /bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh
|
|
RUN ln -s cmake-* cmake-dir
|
|
RUN python3 -m pip install wheel
|
|
ENV PATH=${WORKDIR_PATH}/cmake-dir/bin:$PATH
|
|
RUN pip3 install onnx
|
|
RUN cd onnxruntime && ./build.sh --allow_running_as_root --config Release --update --build --parallel --use_openvino ${DEVICE} --build_shared_lib --build_wheel
|
|
|
|
#Steps to download sources
|
|
RUN cat /etc/apt/sources.list | sed 's/^# deb-src/deb-src/g' > ./temp; mv temp /etc/apt/sources.list
|
|
RUN apt update; apt install dpkg-dev
|
|
RUN mkdir /sources
|
|
WORKDIR /sources
|
|
RUN apt-get source cron iso-codes lsb-release powermgmt-base python-apt-common python3-apt python3-dbus python3-gi unattended-upgrades libapt-pkg6.0 libhogweed5 libnettle7
|
|
WORKDIR /
|
|
RUN tar cvf GPL_sources.tar.gz /sources
|
|
|
|
# Deploy stage
|
|
FROM openvino/ubuntu20_runtime:${OPENVINO_VERSION}
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
USER root
|
|
COPY --from=builder /home/openvino/onnxruntime/build/Linux/Release/dist/*.whl ./
|
|
COPY --from=builder /GPL_sources.tar.gz ./
|
|
RUN python3 -m pip install ./*.whl && rm ./*.whl
|
|
RUN apt update; apt install -y unattended-upgrades && \
|
|
unattended-upgrade
|
|
ARG BUILD_UID=1001
|
|
ARG BUILD_USER=onnxruntimedev
|
|
RUN adduser --uid $BUILD_UID $BUILD_USER
|
|
RUN usermod -a -G video,users ${BUILD_USER}
|
|
ENV WORKDIR_PATH /home/${BUILD_USER}
|
|
WORKDIR ${WORKDIR_PATH}
|
|
|
|
USER ${BUILD_USER}
|
|
ENV PATH=${WORKDIR_PATH}/miniconda/bin:${WORKDIR_PATH}/cmake-dir/bin:$PATH
|
|
ENV IE_PLUGINS_PATH=${INTEL_OPENVINO_DIR}/runtime/lib/intel64
|
|
ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/runtime/3rdparty/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH}
|