docker: cleanup files with nvidia, see new instructions on the wiki (no need to make another image anymore). Added latest OpenCV with xfeatures2d+nonfree modules.

This commit is contained in:
matlabbe
2023-05-07 18:41:44 -07:00
parent 999c01d71d
commit 060af6f7bb
9 changed files with 51 additions and 61 deletions
+4 -1
View File
@@ -5,7 +5,7 @@ FROM ros:melodic-perception
# Install build dependencies
RUN apt-get update && \
apt-get install -y git software-properties-common ros-melodic-rtabmap-ros && \
apt-get remove -y ros-melodic-rtabmap && \
apt-get remove -y ros-melodic-rtabmap* && \
apt-get clean && rm -rf /var/lib/apt/lists/
WORKDIR /root/
@@ -49,6 +49,9 @@ RUN git clone https://github.com/laurentkneip/opengv.git && \
cd && \
rm -r opengv
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Copy current source code
-13
View File
@@ -1,13 +0,0 @@
FROM introlab3it/rtabmap:bionic
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
# On Nvidia Jetpack, uncomment the following (https://github.com/introlab/rtabmap/issues/776):
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
+14
View File
@@ -160,6 +160,20 @@ RUN git clone https://github.com/laurentkneip/opengv.git && \
cd && \
rm -r opengv
RUN git clone --branch 4.2.0 https://github.com/opencv/opencv.git && \
git clone --branch 4.2.0 https://github.com/opencv/opencv_contrib.git && \
cd opencv && \
mkdir build && \
cd build && \
cmake -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \
make -j$(nproc) && \
make install && \
cd ../.. && \
rm -rf opencv opencv_contrib
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Copy current source code
-13
View File
@@ -1,13 +0,0 @@
FROM introlab3it/rtabmap:focal-foxy
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
# On Nvidia Jetpack, uncomment the following (https://github.com/introlab/rtabmap/issues/776):
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
+15 -1
View File
@@ -5,7 +5,7 @@ FROM ros:noetic-perception
# Install build dependencies
RUN apt-get update && \
apt-get install -y git software-properties-common ros-noetic-rtabmap-ros && \
apt-get remove -y ros-noetic-rtabmap && \
apt-get remove -y ros-noetic-rtabmap* && \
apt-get clean && rm -rf /var/lib/apt/lists/
WORKDIR /root/
@@ -159,6 +159,20 @@ RUN git clone https://github.com/laurentkneip/opengv.git && \
cd && \
rm -r opengv
RUN git clone --branch 4.2.0 https://github.com/opencv/opencv.git && \
git clone --branch 4.2.0 https://github.com/opencv/opencv_contrib.git && \
cd opencv && \
mkdir build && \
cd build && \
cmake -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \
make -j$(nproc) && \
make install && \
cd ../.. && \
rm -rf opencv opencv_contrib
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Copy current source code
-13
View File
@@ -1,13 +0,0 @@
FROM introlab3it/rtabmap:focal
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
# On Nvidia Jetpack, uncomment the following (https://github.com/introlab/rtabmap/issues/776):
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
+15 -1
View File
@@ -5,7 +5,7 @@ FROM osrf/ros:humble-desktop
# Install build dependencies
RUN apt-get update && \
apt-get install -y git software-properties-common ros-humble-rtabmap-ros && \
apt-get remove -y ros-humble-rtabmap && \
apt-get remove -y ros-humble-rtabmap* && \
apt-get clean && rm -rf /var/lib/apt/lists/
WORKDIR /root/
@@ -68,6 +68,20 @@ RUN git clone https://github.com/laurentkneip/opengv.git && \
cd && \
rm -r opengv
RUN git clone --branch 4.5.4 https://github.com/opencv/opencv.git && \
git clone --branch 4.5.4 https://github.com/opencv/opencv_contrib.git && \
cd opencv && \
mkdir build && \
cd build && \
cmake -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \
make -j$(nproc) && \
make install && \
cd ../.. && \
rm -rf opencv opencv_contrib
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Copy current source code
-13
View File
@@ -1,13 +0,0 @@
FROM introlab3it/rtabmap:jammy
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# Will be used to read/store databases on host
RUN mkdir -p /root/Documents/RTAB-Map
# On Nvidia Jetpack, uncomment the following (https://github.com/introlab/rtabmap/issues/776):
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
+3 -6
View File
@@ -42,12 +42,14 @@ RUN git clone https://github.com/opencv/opencv.git && \
cd opencv && \
mkdir build && \
cd build && \
cmake -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \
cmake -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \
make -j$(nproc) && \
make install && \
cd ../.. && \
rm -rf opencv
RUN mkdir -p /root/Documents/RTAB-Map
# Copy current source code
COPY . /root/rtabmap
@@ -61,9 +63,4 @@ RUN source /ros_entrypoint.sh && \
rm -rf rtabmap && \
ldconfig
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics