From 1a69bbaeb60da6ad0a650a511d54881955ffdd1c Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Sun, 15 Dec 2024 19:59:05 +0000 Subject: [PATCH] Add Docker Compose files for robot drivers and simulation services --- .docker/compose-robot.yml | 33 +++++++++++++++++++++++++++++++++ .docker/compose.yml | 19 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .docker/compose-robot.yml create mode 100644 .docker/compose.yml diff --git a/.docker/compose-robot.yml b/.docker/compose-robot.yml new file mode 100644 index 0000000..c64c5c5 --- /dev/null +++ b/.docker/compose-robot.yml @@ -0,0 +1,33 @@ +version: '3' +services: + limo_drivers: + image: lcas.lincoln.ac.uk/lcas/limo_platform_arm64:latest + user: "ros" + privileged: true + command: bash -c "source /opt/ros/lcas/install/setup.bash; (zenoh-bridge-ros2dds -l tcp/0.0.0.0:8888 &); (ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" + volumes: + - /dev:/dev + - /tmp/.X11-unix:/tmp/.X11-unix + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + - /home/agilex/.Xauthority:/home/ros/.Xauthority + restart: unless-stopped + environment: + - 'DISPLAY=:0' + - 'ROS_LOCALHOST_ONLY=1' + - 'LIBGL_ALWAYS_SOFTWARE=1' + - 'ROS_DOMAIN_ID=0' + - 'NVIDIA_VISIBLE_DEVICES=all' + network_mode: host + cap_add: + - SYS_PTRACE + security_opt: + - seccomp:unconfined + - apparmor:unconfined + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] \ No newline at end of file diff --git a/.docker/compose.yml b/.docker/compose.yml new file mode 100644 index 0000000..bef7bee --- /dev/null +++ b/.docker/compose.yml @@ -0,0 +1,19 @@ +version: '3' +services: + limo_simulation: + image: lcas.lincoln.ac.uk/lcas/limo_platform_amd64:latest + user: "ros" + command: bash -c "source /opt/ros/lcas/install/setup.bash && ros2 launch limo_gazebosim limo_gazebo_diff.launch.py" + restart: unless-stopped + environment: + - 'ROS_LOCALHOST_ONLY=1' + - 'ROS_DOMAIN_ID=0' + ports: + - "5801" + # deploy: + # resources: + # reservations: + # devices: + # - driver: nvidia + # count: 1 + # capabilities: [gpu] \ No newline at end of file