Skip to content

Commit

Permalink
add dockerfiles with superglue
Browse files Browse the repository at this point in the history
  • Loading branch information
koide3 committed Jun 26, 2024
1 parent f0b9a48 commit 621d4d3
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docker/humble/Dockerfile_with_superglue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM koide3/gtsam_docker:humble

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
libomp-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /root
RUN git clone https://github.com/ceres-solver/ceres-solver \
&& mkdir ceres-solver/build \
&& cd ceres-solver/build \
&& cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DUSE_CUDA=OFF \
&& make -j$(nproc) \
&& make install \
&& rm -rf /root/ceres-solver

COPY . /root/ros2_ws/src/direct_visual_lidar_calibration

WORKDIR /root/ros2_ws

RUN apt-fast update && \
rosdep install -i --from-paths src --simulate | \
sed '1d' | sed 's/apt-get install//' | sed 's/ //g' > /tmp/depends && \
xargs apt-fast install --no-install-recommends -y < /tmp/depends && \
apt-fast clean && \
rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c ". /opt/ros/humble/setup.bash; colcon build"

RUN echo "#!/bin/bash" >> /ros_entrypoint.sh \
&& echo "set -e" >> /ros_entrypoint.sh \
&& echo "source /opt/ros/humble/setup.bash" >> /ros_entrypoint.sh \
&& echo "source /root/ros2_ws/install/setup.bash" >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh \
&& chmod a+x /ros_entrypoint.sh

WORKDIR /root/ros2_ws/src/direct_visual_lidar_calibration

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
python3-pip python3-numpy python3-torch python3-torchvision python3-matplotlib python3-opencv \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/magicleap/SuperGluePretrainedNetwork /root/SuperGlue
ENV PYTHONPATH=$PYTHONPATH:/root/SuperGlue


ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
50 changes: 50 additions & 0 deletions docker/noetic/Dockerfile_with_superglue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM koide3/gtsam_docker:noetic

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
libomp-dev libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /root
RUN git clone https://github.com/ceres-solver/ceres-solver \
&& mkdir ceres-solver/build \
&& cd ceres-solver/build \
&& cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DUSE_CUDA=OFF \
&& make -j$(nproc) \
&& make install \
&& rm -rf /root/ceres-solver

COPY . /root/catkin_ws/src/direct_visual_lidar_calibration

WORKDIR /root/catkin_ws

RUN apt-fast update && \
rosdep install -i --from-paths src --simulate | \
sed '1d' | sed 's/apt-get install//' | sed 's/ //g' > /tmp/depends && \
xargs apt-fast install --no-install-recommends -y < /tmp/depends && \
apt-fast clean && \
rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c ". /opt/ros/noetic/setup.bash; catkin_make"

RUN echo "#!/bin/bash" >> /ros_entrypoint.sh \
&& echo "set -e" >> /ros_entrypoint.sh \
&& echo "source /opt/ros/noetic/setup.bash" >> /ros_entrypoint.sh \
&& echo "source /root/catkin_ws/devel/setup.bash" >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh \
&& chmod a+x /ros_entrypoint.sh

WORKDIR /root/catkin_ws/src/direct_visual_lidar_calibration

RUN apt-fast update \
&& apt-fast install -y --no-install-recommends \
python3-pip python3-numpy python3-torch python3-torchvision python3-matplotlib python3-opencv \
&& apt-fast clean \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/magicleap/SuperGluePretrainedNetwork /root/SuperGlue
ENV PYTHONPATH=$PYTHONPATH:/root/SuperGlue

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]

0 comments on commit 621d4d3

Please sign in to comment.