spiri-sdk/docker-compose.yml

133 lines
3.8 KiB
YAML
Raw Normal View History

2024-09-17 12:30:08 -03:00
version: '3.8'
services:
gui-tools:
runtime: nvidia
build:
context: ./guiTools/
environment:
# Display settings
- DISPLAY=${DISPLAY}
- WAYLAND_DISPLAY=${WAYLAND_DISPLAY}
# - QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-xcb} # Default to X11
# If running with Wayland
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
- ROS_MASTER_URI=http://ros-master:11311
2024-10-03 17:25:09 -03:00
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
# - NVIDIA_VISIBLE_DEVICES=all
volumes:
# X11 socket
- /tmp/.X11-unix:/tmp/.X11-unix
2024-09-19 14:33:29 -03:00
- ${XAUTHORITY:-~/.Xauthority}:/root/.Xauthority
# Wayland socket
#- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0
# Allow access to the host's GPU
- /dev/dri:/dev/dri
devices:
# Provide access to GPU devices
- /dev/dri:/dev/dri
# network_mode: host
ipc: host
2024-09-19 14:33:29 -03:00
#user: "${UID}:${GID}"
privileged: true # Allow privileged access if necessary (e.g., for GPU access)
# restart: unless-stopped
# command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition
profiles: [ui,]
# deploy:
# resources:
# reservations:
# devices:
# - driver: cdi
# device_ids:
# - nvidia.com/gpu=all
2024-09-17 12:30:08 -03:00
ardupilot:
image: git.spirirobotics.com/spiri/ardupilot:spiri-master
command:
- /bin/bash
- -c
- |
./Tools/autotest/sim_vehicle.py -v ArduCopter -f gazebo-iris --model=JSON --no-rebuild \
--enable-dds --sim-address=$(python3 -c 'import socket; print(socket.gethostbyname("gz-test"))') --no-mavproxy
2024-09-17 12:30:08 -03:00
stdin_open: true
tty: true
mavproxy:
image: git.spirirobotics.com/spiri/services-mavproxy:main
command: >
mavproxy.py --non-interactive
--out tcpin:0.0.0.0:5760
--master tcp:ardupilot:5760
--out udpin:0.0.0.0:14550
--out udpin:0.0.0.0:14551
--out udpin:0.0.0.0:5000
2024-09-17 12:30:08 -03:00
restart: always
ports:
- 5760:5760
mavros:
#This service bridges our mavlink-based robot-coprosessor into ROS
#In this example it connects to a simulated coprocessor.
image: git.spirirobotics.com/spiri/services-ros1-mavros:master
command: roslaunch mavros px4.launch fcu_url:="udp://:14555@mavproxy:14550" tgt_system:="1"
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
depends_on:
ros-master:
condition: service_healthy
mavproxy:
condition: service_started
restart: always
deploy:
resources:
limits:
# cpus: '0.01'
memory: 200M
ulimits:
nofile:
soft: 1024
hard: 524288
2024-10-03 17:25:09 -03:00
mavros2:
#This service bridges our mavlink-based robot-coprosessor into ROS
#In this example it connects to a simulated coprocessor.
image: git.spirirobotics.com/spiri/services-ros2-mavros:main
command: ros2 launch mavros px4.launch fcu_url:="udp://:14555@mavproxy:14551" tgt_system:="1"
2024-10-03 17:25:09 -03:00
#environment:
# - "ROS_MASTER_URI=http://ros-master:11311"
depends_on:
ardupilot:
condition: service_started
restart: always
deploy:
resources:
limits:
# cpus: '0.01'
memory: 200M
ulimits:
nofile:
soft: 1024
hard: 524288
2024-09-17 12:30:08 -03:00
ros-master:
image: git.spirirobotics.com/spiri/services-ros1-core:main
command: stdbuf -o L roscore
environment:
2024-09-17 14:09:45 -03:00
- "ROS_MASTER_URI=http://localhost:11311"
2024-09-17 12:30:08 -03:00
restart: always
ports:
- "127.0.0.1:11311:11311"
deploy:
resources:
limits:
memory: 1G
# Madness, setting a low ulimit here fixes memory leaks
# https://answers.ros.org/question/336963/rosout-high-memory-usage/
ulimits:
nofile:
soft: 1024
hard: 524288