-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (57 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
58 lines (57 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
services:
zed:
build:
context: .
dockerfile: Dockerfile
image: zed-custom:latest
container_name: ${container_name}
hostname: ${hostname}
# Make the container's hostname resolve locally so DDS doesn't advertise
# an unroutable address to peers on the LAN.
extra_hosts:
- "${hostname}:127.0.0.1"
privileged: true # needed for USB camera access (ZED is USB or GMSL)
stdin_open: true # -i
tty: true # -t
network_mode: host # DDS discovery on the host LAN (matches the other services)
ipc: host # shared-memory DDS transport — useful for heavy ZED image topics
pid: host # so `ros2 node list` sees host nodes and vice versa
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID}
- ROS_LOCALHOST_ONLY=${ROS_LOCALHOST_ONLY}
- RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION}
- FASTDDS_DEFAULT_PROFILES_FILE=${FASTDDS_DEFAULT_PROFILES_FILE}
- CYCLONEDDS_URI=${CYCLONEDDS_URI}
- RMW_ZENOH_CONFIG_FILE=${RMW_ZENOH_CONFIG_FILE}
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
# Force GLX to use the NVIDIA dGPU instead of the Intel iGPU —
# Arrow Lake's iris PCI ID is newer than the container's Mesa.
- __NV_PRIME_RENDER_OFFLOAD=1
- __GLX_VENDOR_LIBRARY_NAME=nvidia
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /dev:/dev # ZED USB + other devices
# DDS profiles — same layout as the other services in this repo.
- ./dds_profiles:/dds_profiles:ro
# Your own ROS 2 packages — mounted as a SEPARATE workspace so the
# pre-built ZED wrapper workspace at /root/ros2_ws stays intact.
- ./user_ws:/root/user_ws
# Persist the per-serial calibration .conf downloaded from Stereolabs
# and the GPU-optimized Neural depth models, so they survive container
# recreation / rebuilds and don't re-download/re-optimize every time.
- zed_settings:/usr/local/zed/settings
- zed_resources:/usr/local/zed/resources
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
command: /bin/bash -l
volumes:
zed_settings:
zed_resources: