mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-09-15 07:40:20 +08:00
Docker: added foxy, humble, humble-latest
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'ros2'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
docker_tag: [foxy, humble, humble-latest]
|
||||
include:
|
||||
- docker_tag: foxy
|
||||
docker_path: 'foxy'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
- docker_tag: humble
|
||||
docker_path: 'humble'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
- docker_tag: humble-latest
|
||||
docker_path: 'humble/latest'
|
||||
docker_platforms: |
|
||||
linux/amd64
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: all
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: ${{ matrix.docker_platforms }}
|
||||
file: ./docker/${{ matrix.docker_path }}/Dockerfile
|
||||
tags: introlab3it/rtabmap_ros:${{ matrix.docker_tag }}
|
||||
cache-from: type=registry,ref=introlab3it/rtabmap_ros:${{ matrix.docker_tag }}
|
||||
cache-to: type=inline
|
||||
|
||||
+3
-4
@@ -29,9 +29,9 @@
|
||||
|
||||
* Launch `rtabmap` from inside the container (**with gui**, if you have a nvidia GPU, follow those [instructions](http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration#nvidia-docker2) with nvidia-docker2 using one of the images above instead of the ros image example, or for other GPUs try the intel/AMD [instructions](http://wiki.ros.org/action/fullsearch/docker/Tutorials/Hardware%20Acceleration) to build a `rtabmap_ros3d` image with your GPU driver), saving the database on host `~/.ros/rtabmap.db`:
|
||||
|
||||
* With [nvidia-docker2 approach](http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration#nvidia-docker2), we would have this Dockerfile:
|
||||
* With [nvidia-docker2 approach](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html), we would have this Dockerfile:
|
||||
```docker
|
||||
FROM introlab3it/rtabmap_ros:noetic
|
||||
FROM introlab3it/rtabmap_ros:humble
|
||||
|
||||
# nvidia-container-runtime
|
||||
ENV NVIDIA_VISIBLE_DEVICES \
|
||||
@@ -56,8 +56,7 @@
|
||||
--env="XAUTHORITY=$XAUTH" \
|
||||
--volume="$XAUTH:$XAUTH" \
|
||||
--runtime=nvidia \
|
||||
--env ROS_MASTER_URI=http://172.17.0.1:11311 --env ROS_IP=172.17.0.2 \
|
||||
-v ~/.ros:/root \
|
||||
rtabmap_ros3d \
|
||||
roslaunch rtabmap_ros rtabmap.launch database_path:=/root/rtabmap.db rtabmap_args:="--delete_db_on_start"
|
||||
ros2 launch rtabmap_ros rtabmap.launch.py database_path:=/root/rtabmap.db rtabmap_args:="--delete_db_on_start"
|
||||
```
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM osrf/ros:foxy-desktop
|
||||
# install rtabmap packages
|
||||
ARG CACHE_DATE=2016-01-01
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ros-foxy-rtabmap \
|
||||
ros-foxy-rtabmap-ros \
|
||||
&& rm -rf /var/lib/apt/lists/
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM osrf/ros:humble-desktop
|
||||
# install rtabmap packages
|
||||
ARG CACHE_DATE=2016-01-01
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ros-humble-rtabmap \
|
||||
ros-humble-rtabmap-ros \
|
||||
&& rm -rf /var/lib/apt/lists/
|
||||
@@ -0,0 +1,14 @@
|
||||
FROM introlab3it/rtabmap:22.04
|
||||
|
||||
RUN source /ros_entrypoint.sh && \
|
||||
mkdir -p ros2_ws/src && \
|
||||
cd ros2_ws/src
|
||||
|
||||
COPY . ros2_ws/src/rtabmap_ros
|
||||
|
||||
RUN source /ros_entrypoint.sh && \
|
||||
cd ros2_ws && \
|
||||
export MAKEFLAGS="-j$(nproc)" && \
|
||||
colcon build --event-handlers console_direct+ --install-base /opt/ros/humble --merge-install --cmake-args -DRTABMAP_SYNC_MULTI_RGBD=ON -DCMAKE_BUILD_TYPE=Release && \
|
||||
cd && \
|
||||
rm -rf ros2_ws
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --build-arg CACHE_DATE="$(date)" --cache-from $IMAGE_NAME -f $DOCKERFILE_PATH -t $IMAGE_NAME -t $DOCKER_REPO:humble-latest .
|
||||
Reference in New Issue
Block a user