From 031d34016b45286adeb764d228534dfe9b5f80dc Mon Sep 17 00:00:00 2001 From: wujiawei Date: Thu, 8 Dec 2022 00:17:51 +0800 Subject: [PATCH] modify dockerfile for melodic and noetic on ov2021 --- docker/ros_2021.4/ros_melodic/Dockerfile | 24 ++++++------ docker/ros_2021.4/ros_noetic/Dockerfile | 48 ++++++++++++++++++------ 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/docker/ros_2021.4/ros_melodic/Dockerfile b/docker/ros_2021.4/ros_melodic/Dockerfile index a7242083..0eb771a5 100644 --- a/docker/ros_2021.4/ros_melodic/Dockerfile +++ b/docker/ros_2021.4/ros_melodic/Dockerfile @@ -4,17 +4,20 @@ from osrf/ros:melodic-desktop-full # setting proxy env --option -ENV http_proxy=http://child-prc.intel.com:913 -ENV https_proxy=http://child-prc.intel.com:913 +# If needed, enable the below ENV setting by correct proxies. +# ENV HTTP_PROXY="your_proxy" +# ENV HTTPS_PROXY="your_proxy" +# ENV FTP_PROXY="your_proxy" # maintainer information -LABEL maintainer="Pengqiang Li " +LABEL maintainer="Jiawei Wu " # default shell type SHELL ["/bin/bash", "-c"] # ignore the warning ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 RUN apt-get update && apt-get install --assume-yes apt-utils #update cmake @@ -31,7 +34,7 @@ RUN curl -s https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO RUN echo "deb https://apt.repos.intel.com/openvino/2021 all main" | tee /etc/apt/sources.list.d/intel-openvino-2021.list RUN apt update RUN apt-cache search openvino -RUN apt-get install -y intel-openvino-dev-ubuntu20-2021.4.582 +RUN apt-get install -y intel-openvino-dev-ubuntu18-2021.4.582 RUN ls -lh /opt/intel/openvino_2021 RUN source /opt/intel/openvino_2021/bin/setupvars.sh @@ -64,13 +67,12 @@ RUN ln -sf libboost_python-py36.so libboost_python37.so # build ros openvino toolkit # set env before build ros openvino tolkkit WORKDIR /root -RUN mkdir -p ros_ws/src -WORKDIR /root/ros_ws/src -RUN git init && git clone -b dev-ov2021.4 https://github.com/pqLee/ros_openvino_toolkit.git \ +RUN mkdir -p catkin_ws/src +WORKDIR /root/catkin_ws/src +RUN git init && git clone -b master https://github.com/intel/ros_openvino_toolkit \ && git clone https://github.com/intel/object_msgs.git \ && git clone -b melodic https://github.com/ros-perception/vision_opencv.git \ -&& git clone https://github.com/intel-ros/realsense.git -WORKDIR /root/ros_ws/src/realsense -RUN git checkout 2.1.3 -WORKDIR /root/ros_ws/ +&& git clone -b ros1-legacy https://github.com/IntelRealSense/realsense-ros.git +RUN apt-get install ros-melodic-ddynamic-reconfigure +WORKDIR /root/catkin_ws/ RUN source /opt/ros/melodic/setup.bash && source /opt/intel/openvino_2021/bin/setupvars.sh && catkin_make_isolated diff --git a/docker/ros_2021.4/ros_noetic/Dockerfile b/docker/ros_2021.4/ros_noetic/Dockerfile index e03817ed..66991aee 100644 --- a/docker/ros_2021.4/ros_noetic/Dockerfile +++ b/docker/ros_2021.4/ros_noetic/Dockerfile @@ -1,20 +1,31 @@ -# ros openvino toolkit env master f1b1ca4d914186a1881b87f103be9c6e910c9d80 +# ros openvino toolkit env master ec5b9b9716e4 +# image base on ros-noetic from osrf/ros:noetic-desktop-full # setting proxy env --option -ENV http_proxy=http://child-prc.intel.com:913 -ENV https_proxy=http://child-prc.intel.com:913 +# If needed, enable the below ENV setting by correct proxies. +# ENV HTTP_PROXY="your_proxy" +# ENV HTTPS_PROXY="your_proxy" +# ENV FTP_PROXY="your_proxy" # maintainer information -LABEL maintainer="Pengqiang Li " +LABEL maintainer="Jiawei Wu " +# default shell type SHELL ["/bin/bash", "-c"] # ignore the warning ARG DEBIAN_FRONTEND=noninteractive +ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 RUN apt-get update && apt-get install --assume-yes apt-utils -RUN apt-get install -y git + +#update cmake +WORKDIR /tmp +RUN apt-get install -y wget && wget https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.sh \ +&& chmod +x cmake-3.14.4-Linux-x86_64.sh \ +&& ./cmake-3.14.4-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license \ +&& rm ./cmake-3.14.4-Linux-x86_64.sh # install openvino 2021.4 # https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html @@ -42,13 +53,26 @@ libgflags-dev \ libboost-all-dev \ && rm -rf /var/lib/apt/lists/* +# other dependencies +RUN apt-get update && apt-get install -y python3-pip && python3 -m pip install -U \ +numpy \ +networkx \ +pyyaml \ +requests \ +&& apt-get install -y --no-install-recommends libboost-all-dev +WORKDIR /usr/lib/x86_64-linux-gnu +RUN ln -sf libboost_python-py36.so libboost_python37.so + + # build ros openvino toolkit -#RUN apt-get install -y git +# set env before build ros openvino tolkkit WORKDIR /root -RUN mkdir -p ros_ws/src -WORKDIR /root/ros_ws/src -RUN git clone https://github.com/intel/object_msgs.git -RUN git clone -b noetic https://github.com/pqLee/ros_openvino_toolkit.git -RUN git clone -b noetic https://github.com/ros-perception/vision_opencv.git -WORKDIR /root/ros_ws +RUN mkdir -p catkin_ws/src +WORKDIR /root/catkin_ws/src +RUN git init && git clone -b master https://github.com/intel/ros_openvino_toolkit \ +&& git clone https://github.com/intel/object_msgs.git \ +&& git clone -b noetic https://github.com/ros-perception/vision_opencv.git \ +&& git clone -b ros1-legacy https://github.com/IntelRealSense/realsense-ros.git +RUN apt-get install ros-noetic-ddynamic-reconfigure +WORKDIR /root/catkin_ws/ RUN source /opt/ros/noetic/setup.bash && source /opt/intel/openvino_2021/bin/setupvars.sh && catkin_make_isolated