-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
79 lines (70 loc) · 2.1 KB
/
compose.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
ros2_jammy_sim:
build:
context: ./docker_simulator/DockerFiles
dockerfile: Dockerfile
args:
- BASE_IMAGE=osrf/ros
- BASE_TAG=jazzy-desktop-full
- DISTRO=jazzy
- IMAGE_NAME=docker_control_simulation
- IMAGE_TAG=0.1
- WORKSPACE=docker_simulation_ws
container_name: ros2_jammy_simulator
networks:
- ros2_internal
# network_mode: "host"
# Interactive shell settings
stdin_open: true
tty: true
# Network settings
# Environment variables
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- XAUTHORITY=/tmp/.docker.xauth
- ROS_DOMAIN_ID=0
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
# Shell history
- HISTFILE=/home/ros/.bash_history
- HISTFILESIZE=10000
- RCUTILS_COLORIZED_OUTPUT=1
- GZ_VERSION=harmonic
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all,graphics,display,video,utility,compute
- __NV_PRIME_RENDER_OFFLOAD=1
- __GLX_VENDOR_LIBRARY_NAME=nvidia
privileged: true # Fixed spelling and removed duplicate
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# - /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ~/.bash_history:/home/ros/.bash_history
- ./docker_simulator:/home/ros/docker_simulation_ws
- /dev/input:/dev/input
- /dev/dri:/dev/dri
- /dev/nvidia0:/dev/nvidia0
- /dev/nvidiactl:/dev/nvidiactl
- /dev/nvidia-modeset:/dev/nvidia-modeset
# Command to source ROS2 environment and start shell
command: >
bash -c "
source /opt/ros/jazzy/setup.bash &&
echo 'ROS2 Jazzy environment loaded' &&
bash
"
# devices:
# - /dev/dri:/dev/dri
# - /dev/nvidia0:/dev/nvidia0
# - /dev/nvidiactl:/dev/nvidiactl
# - /dev/nvidia-modeset:/dev/nvidia-modeset
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
ros2_internal:
driver: bridge