-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
58 lines (54 loc) · 1.41 KB
/
docker-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
version: "3.3"
# Instructions
# https://github.com/utra-robosoccer/soccerbot/wiki/Docker
x-gpu: &gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu, compute, utility, graphics]
x-rob498: &rob498 # <<: *gpu
image: utrarobosoccer/rob498
privileged: true
user: "1000"
build:
context: .
target: builder
args:
- BUILDKIT_INLINE_CACHE=1
- USER=${USER}
cache_from:
- utrarobosoccer/rob498
cap_add:
- SYS_PTRACE
- SYS_NICE
pid: "host"
security_opt:
- seccomp:unconfined
stdin_open: true
tty: true
# Command that runs when docker-compose up is executed
command:
/bin/bash -c "source ~/catkin_ws/devel/setup.bash && roslaunch drone drone.launch || sleep infinity"
volumes:
- .:/home/$USER/catkin_ws/src/ROB498
- .:/home/drone/catkin_ws/src/ROB498
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /dev/dri:/dev/dri:rw
- /dev/snd:/dev/snd:rw
- /var/run/docker.sock:/var/run/docker.sock
services:
drone:
<<: *rob498
network_mode: host
command:
/bin/bash -c "source ~/catkin_ws/devel/setup.bash && roslaunch drone drone.launch || sleep infinity"
# Environmental variables passed into docker
environment:
PYTHONUNBUFFERED: 1
DISPLAY: unix$DISPLAY
XDG_RUNTIME_DIR: $XDG_RUNTIME_DIR
SIM: "true"
DOCKER_RUN: "true"