|
| 1 | +# Copyright (C) 2024 Intel Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +FROM ubuntu:24.10 |
| 5 | + |
| 6 | +ARG DEBIAN_FRONTEND=noninteractive |
| 7 | +USER root |
| 8 | + |
| 9 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 10 | +# Essential Tools |
| 11 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 12 | + |
| 13 | +RUN apt update -y && apt install -y \ |
| 14 | + software-properties-common \ |
| 15 | + build-essential \ |
| 16 | + wget \ |
| 17 | + gpg \ |
| 18 | + curl \ |
| 19 | + pciutils \ |
| 20 | + git \ |
| 21 | + cmake \ |
| 22 | + libopencv-dev \ |
| 23 | + v4l-utils \ |
| 24 | + libusb-1.0-0-dev \ |
| 25 | + libssl-dev \ |
| 26 | + libgtk-3-dev \ |
| 27 | + pkg-config \ |
| 28 | + udev \ |
| 29 | + libudev-dev \ |
| 30 | + libglfw3-dev \ |
| 31 | + libgl1-mesa-dev \ |
| 32 | + libglu1-mesa-dev \ |
| 33 | + python3-pip \ |
| 34 | + python3-dev \ |
| 35 | + python3-setuptools \ |
| 36 | + python3-opencv |
| 37 | + |
| 38 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 39 | +# Graphic & NPU drivers and tools |
| 40 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 41 | + |
| 42 | +# Install Intel GPU Drivers |
| 43 | +RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ |
| 44 | + gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ |
| 45 | + echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] \ |
| 46 | + https://repositories.intel.com/gpu/ubuntu noble client" \ |
| 47 | + > /etc/apt/sources.list.d/intel-gpu-noble.list && \ |
| 48 | + apt update -y && apt install -y libze1 intel-level-zero-gpu intel-opencl-icd clinfo |
| 49 | + |
| 50 | +# Install Intel NPU Drivers |
| 51 | +WORKDIR /tmp |
| 52 | +RUN apt install -y libtbb12 |
| 53 | +RUN wget https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-driver-compiler-npu_1.10.0.20241107-11729849322_ubuntu24.04_amd64.deb \ |
| 54 | + https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-fw-npu_1.10.0.20241107-11729849322_ubuntu24.04_amd64.deb \ |
| 55 | + https://github.com/intel/linux-npu-driver/releases/download/v1.10.0/intel-level-zero-npu_1.10.0.20241107-11729849322_ubuntu24.04_amd64.deb && \ |
| 56 | + dpkg -i *.deb && rm -f *.deb |
| 57 | + |
| 58 | +# Install Intel PCM Tool |
| 59 | +RUN git clone --recursive https://github.com/intel/pcm && \ |
| 60 | + cd pcm && mkdir build && cd build && \ |
| 61 | + cmake .. && cmake --build . --parallel && make install && \ |
| 62 | + rm -rf /tmp/pcm |
| 63 | + |
| 64 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 65 | +# OpenVINO |
| 66 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 67 | + |
| 68 | +WORKDIR /opt/intel |
| 69 | +# Install OpenVINO |
| 70 | +RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.5/linux/l_openvino_toolkit_ubuntu24_2024.5.0.17288.7975fa5da0c_x86_64.tgz \ |
| 71 | + --output openvino.tgz |
| 72 | +RUN tar -xf openvino.tgz |
| 73 | +RUN mv l_openvino_toolkit_ubuntu24_2024.5.0.17288.7975fa5da0c_x86_64 openvino |
| 74 | +RUN cd openvino && sed -i 's/24\.04/24\.10/g' ./install_dependencies/install_openvino_dependencies.sh && \ |
| 75 | + bash ./install_dependencies/install_openvino_dependencies.sh -y |
| 76 | +ENV OPENVINO_DIR=/opt/intel/openvino |
| 77 | +RUN pip install --pre -U openvino openvino-dev --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly --break-system-packages |
| 78 | + |
| 79 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 80 | +# librealsense |
| 81 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 82 | + |
| 83 | +WORKDIR /tmp |
| 84 | +RUN git clone https://github.com/IntelRealSense/librealsense |
| 85 | + |
| 86 | +RUN cd librealsense && mkdir build && cd build && \ |
| 87 | + cmake .. -DBUILD_PYTHON_BINDINGS=ON -DPYTHON_EXECUTABLE=$(which python3) && \ |
| 88 | + make -j$(nproc) && \ |
| 89 | + make install && \ |
| 90 | + ldconfig |
| 91 | + |
| 92 | +#python3 -m pip install --no-cache-dir pyrealsense2 --break-system-packages |
| 93 | + |
| 94 | +ENV PYTHONPATH=/usr/local/lib/python3.12/dist-packages |
| 95 | + |
| 96 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 97 | +# Required Python Packages |
| 98 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 99 | + |
| 100 | +RUN pip3 install --break-system-packages \ |
| 101 | + fire \ |
| 102 | + distro \ |
| 103 | + zeroconf \ |
| 104 | + psutil \ |
| 105 | + cython \ |
| 106 | + prometheus-client \ |
| 107 | + zeroconf |
| 108 | + |
| 109 | +RUN pip3 install --break-system-packages \ |
| 110 | + yt-dlp \ |
| 111 | + youtube_dl \ |
| 112 | + pafy |
| 113 | + |
| 114 | +RUN apt remove -y python3-blinker || true |
| 115 | +RUN pip3 install --break-system-packages \ |
| 116 | + flask \ |
| 117 | + flask_bootstrap |
| 118 | + |
| 119 | +RUN pip3 install --break-system-packages \ |
| 120 | + nncf \ |
| 121 | + ultralytics |
| 122 | + |
| 123 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 124 | +# Video Steams Download |
| 125 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 126 | + |
| 127 | +WORKDIR /opt/videos |
| 128 | + |
| 129 | +RUN wget -O streat.mp4 https://videos.pexels.com/video-files/3759216/3759216-sd_640_360_30fps.mp4 |
| 130 | +#RUN wget -O animals.mp4 https://videos.pexels.com/video-files/4938060/4938060-uhd_2732_1440_30fps.mp4 |
| 131 | + |
| 132 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 133 | +# Models Preparation |
| 134 | +#-------------------------------------------------------------------------------------------------------------------------- |
| 135 | + |
| 136 | +WORKDIR /opt/models |
| 137 | + |
| 138 | +COPY ./utils/models.sh /tmp/ |
| 139 | +RUN /tmp/models.sh |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +RUN rm -rf /tmp/* |
| 144 | + |
| 145 | +WORKDIR /workspace |
| 146 | + |
| 147 | + |
0 commit comments