|
| 1 | +# ros2 openvino toolkit env master f1b1ca4d914186a1881b87f103be9c6e910c9d80 |
| 2 | + |
| 3 | +from osrf/ros:foxy-desktop |
| 4 | + |
| 5 | +MAINTAINER Cong Liu [email protected] |
| 6 | + |
| 7 | +SHELL ["/bin/bash", "-c"] |
| 8 | + |
| 9 | +# install openvino 2021.3 |
| 10 | +# https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html |
| 11 | +RUN apt update && apt install curl gnupg2 lsb-release |
| 12 | +RUN curl -s https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021 |apt-key add - |
| 13 | +RUN echo "deb https://apt.repos.intel.com/openvino/2021 all main" | tee /etc/apt/sources.list.d/intel-openvino-2021.list |
| 14 | +RUN apt update |
| 15 | +RUN apt-cache search openvino |
| 16 | +RUN apt-get install -y intel-openvino-dev-ubuntu20-2021.3.394 |
| 17 | +RUN ls -lh /opt/intel/openvino_2021 |
| 18 | +RUN source /opt/intel/openvino_2021/bin/setupvars.sh |
| 19 | + |
| 20 | +# install librealsense2 |
| 21 | +# https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md |
| 22 | +RUN apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE |
| 23 | +#RUN add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo focal main" -u |
| 24 | +RUN echo 'deb https://librealsense.intel.com/Debian/apt-repo focal main' | sudo tee /etc/apt/sources.list.d/realsense-public.list |
| 25 | +RUN apt-get update && apt-get install -y librealsense2-dev librealsense2 |
| 26 | +RUN dpkg -l |grep realsense |
| 27 | + |
| 28 | +# build ros2 openvino toolkit |
| 29 | +WORKDIR /root |
| 30 | +RUN mkdir -p ros2_ws/src |
| 31 | +WORKDIR /root/ros2_ws/src |
| 32 | +RUN git clone https://github.com/intel/ros2_object_msgs.git |
| 33 | +RUN git clone https://github.com/intel/ros2_openvino_toolkit.git |
| 34 | +WORKDIR /root/ros2_ws |
| 35 | +RUN source /opt/ros/foxy/setup.bash && source /opt/intel/openvino_2021/bin/setupvars.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release |
0 commit comments