-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yml
72 lines (60 loc) · 2.27 KB
/
docker-compose.dev.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.9'
volumes:
# Store VS Code extensions in named volume to prevent re-downloads.
# See: https://code.visualstudio.com/remote/advancedcontainers/avoid-extension-reinstalls
# Also see: https://github.com/microsoft/vscode-remote-release/issues/7690
vscode-extensions:
# Store pip wheel cache in named volume to prevent re-downloads.
pip-whl-cache:
services:
dev:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
# Store VS Code extensions in named volume to prevent re-downloads.
- vscode-extensions:/root/.vscode-server
# Store pip wheel cache in named volume to prevent re-downloads.
- pip-whl-cache:/root/.cache/pip
# Allow access to Docker daemon for VS Code Docker extension to work inside container.
- /var/run/docker.sock:/var/run/docker.sock
# (OPTION) Mount point for `data` folder.
# - $USERPROFILE\Documents\project-name-data:/data:cached # $USERPROFILE (Windows) & $HOME (Linux) are absolute paths too.
# (OPTION) Legacy support for mounting repository from host filesystem.
# - .:/code:cached
# Better process handling by using a process management system (tini).
init: true
# Larger shared memory for VNC & ROS.
shm_size: 1gb
# Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
# Used to allow ROS to communicate across containers.
ipc: service:donor
pid: service:donor
# Isolate ROS nodes into their own network.
network_mode: service:donor
# Override default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"
# Request for GPU access.
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
# Example of setup for ROS to be able to communicate across containers.
# Is unnecessary if using a single container.
donor:
ports:
# Expose noVNC web app.
- 6080:6080
# Expose rosbridge.
- 9090:9090
# Used to allow ROS to communicate across containers.
ipc: shareable
pid: shareable
image: alpine # smallest image
stop_signal: SIGKILL
command: sleep infinity