-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
49 lines (47 loc) · 1.85 KB
/
docker-compose.yml
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
services:
dev:
build:
context: ../workspace
dockerfile: ../ros_docker_setup/Dockerfile
args:
ROS_DISTRO: ${ROS_DISTRO}
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
image: syllo/ros:${ROS_DISTRO}
container_name: ros_${ROS_DISTRO}
network_mode: "host" # access to host's network
stdin_open: true # docker run -i
tty: true # docker run -t
privileged: true # Needed for /dev volume
environment:
- DISPLAY=${DISPLAY} # Pass the display for GUI
- QT_X11_NO_MITSHM=1 # Needed by QT programs
- XAUTHORITY=/tmp/.docker.xauth
- TERM=xterm-256color # Enable terminal colors
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ../workspace/src:/home/ros/workspace/src
- ../data:/home/ros/data
- /dev:/dev # Needed for sensors
dev-nvidia:
image: syllo/ros:${ROS_DISTRO}
container_name: ros_${ROS_DISTRO}_nvidia
network_mode: "host" # access to host's network
stdin_open: true # docker run -i
tty: true # docker run -t
privileged: true # Needed for /dev volume
runtime: nvidia
environment:
- DISPLAY=${DISPLAY} # Pass the display for GUI
- QT_X11_NO_MITSHM=1 # Needed by QT programs
- XAUTHORITY=/tmp/.docker.xauth
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- TERM=xterm-256color # Enable terminal colors
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ../workspace/src:/home/ros/workspace/src
- ../data:/home/ros/data
- /dev:/dev # Needed for sensors