mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
### Description Upgrade cmake version to 3.24 because I need to use a new feature that is only provided in that version and later. Starting from cmake 3.24, the [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html#module:FetchContent) module and the [find_package()](https://cmake.org/cmake/help/latest/command/find_package.html#command:find_package) command now support integration capabilities, which means calls to "FetchContent" can be implicitly redirected to "find_package", and vice versa. Users can use a cmake variable to control the behavior. So, we don't need to provide such a build option. We can delete our "onnxruntime_PREFER_SYSTEM_LIB" build option and let cmake handle it. And it would be easier for who wants to use vcpkg. ### Motivation and Context Provide a unified package management method, and get aligned with the community. This change is split from #13523 for easier review.
48 lines
2.6 KiB
Text
48 lines
2.6 KiB
Text
ARG UBUNTU_VERSION=20.04
|
|
FROM ubuntu:${UBUNTU_VERSION}
|
|
|
|
ARG OPENVINO_VERSION=2022.2.0
|
|
ARG PYTHON_VERSION=3.8
|
|
|
|
ADD scripts /tmp/scripts
|
|
RUN /tmp/scripts/install_ubuntu.sh -p ${PYTHON_VERSION} -d EdgeDevice && \
|
|
/tmp/scripts/install_os_deps.sh -d EdgeDevice && \
|
|
/tmp/scripts/install_python_deps.sh -p ${PYTHON_VERSION} -d EdgeDevice
|
|
|
|
RUN apt update && apt install -y libnuma1 ocl-icd-libopencl1 && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/scripts
|
|
|
|
ENV INTEL_OPENVINO_DIR /opt/intel/openvino_${OPENVINO_VERSION}
|
|
ENV LD_LIBRARY_PATH $INTEL_OPENVINO_DIR/runtime/lib/intel64:$INTEL_OPENVINO_DIR/runtime/3rdparty/tbb/lib:/usr/local/openblas/lib:$LD_LIBRARY_PATH
|
|
ENV InferenceEngine_DIR $INTEL_OPENVINO_DIR/runtime/cmake
|
|
ENV ngraph_DIR $INTEL_OPENVINO_DIR/runtime/cmake
|
|
ENV IE_PLUGINS_PATH $INTEL_OPENVINO_DIR/runtime/lib/intel64
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PATH /usr/local/gradle/bin:$PATH
|
|
|
|
RUN cd /opt && mkdir -p intel && cd intel && \
|
|
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.2/linux/l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64.tgz && \
|
|
tar xzf l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64.tgz && rm -rf l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64.tgz && \
|
|
mv l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64 openvino_2022.2.0 && \
|
|
cd $INTEL_OPENVINO_DIR/install_dependencies && ./install_openvino_dependencies.sh -y
|
|
|
|
WORKDIR /root
|
|
|
|
RUN wget "https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-gmmlib_21.3.3_amd64.deb" && \
|
|
wget "https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9441/intel-igc-core_1.0.9441_amd64.deb" && \
|
|
wget "https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9441/intel-igc-opencl_1.0.9441_amd64.deb" && \
|
|
wget "https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-opencl-icd_21.48.21782_amd64.deb" && \
|
|
wget "https://github.com/intel/compute-runtime/releases/download/21.48.21782/intel-level-zero-gpu_1.2.21782_amd64.deb" && \
|
|
sudo dpkg -i *.deb && rm -rf *.deb
|
|
|
|
RUN mkdir -p /opt/cmake/bin && \
|
|
wget https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-linux-x86_64.tar.gz && \
|
|
tar -xf cmake-3.24.3-linux-x86_64.tar.gz --strip 1 -C /opt/cmake && rm -rf /cmake-3.24.3-linux-x86_64.tar.gz && \
|
|
ln -sf /opt/cmake/bin/* /usr/bin
|
|
|
|
ARG BUILD_UID=1000
|
|
ARG BUILD_USER=onnxruntimedev
|
|
WORKDIR /home/$BUILD_USER
|
|
RUN adduser --gecos 'onnxruntime Build User' --disabled-password $BUILD_USER --uid $BUILD_UID
|
|
RUN adduser $BUILD_USER video
|
|
USER $BUILD_USER
|