Skip to content

Commit e9a8ba4

Browse files
committed
Merge commit '68f4897e67ce1802ec814a462c6e4e5e16a6aef4'
2 parents 3fec62f + 68f4897 commit e9a8ba4

2 files changed

Lines changed: 32 additions & 34 deletions

File tree

compose_linux_host.yaml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
ipc: host
88
pid: host
99
privileged: true
10-
runtime: nvidia
10+
network_mode: host
1111
environment:
1212
- DISPLAY=${DISPLAY:-:0}
1313
- NVIDIA_DRIVER_CAPABILITIES=all
@@ -16,51 +16,20 @@ services:
1616
- ROS_MASTER_URI=http://localhost:11311/
1717
- DEBIAN_FRONTEND=noninteractive
1818
network_mode: host
19-
# ports:
20-
# - "3022:22" # sshd
21-
# - "3080:80" # novnc
22-
# - "3081:3000" # vscode-server
23-
# - "11311:11311" # ros
24-
25-
# extra_hosts:
26-
# - "simulator:127.0.0.1" # fix rviz hostname
2719
volumes:
2820
- ${localWorkspaceFolder:-./local_mount}:/home/ubuntu/ros_ws
2921
- /etc/localtime:/etc/localtime:ro
3022
- /etc/timezone:/etc/timezone:ro
3123
- /tmp/.X11-unix:/tmp/.X11-unix
3224
- /var/log/val_logger:/var/log/val_logger
33-
# - ${HOME}/.Xauthority:/home/ubuntu/.Xauthority
34-
# linux network configuration
35-
#mac_address: EE:9E:AB:F9:31:AF # <-- MAC needs to be unique in this network (gerated randomly)
36-
# networks:
37-
# macvlan_ros1_network: # <-- MACVlan Name no need to change, but it needs to be unique
38-
# ipv4_address: 150.164.212.235 # <-- Update; must be the IP that you want to use as for the container
3925
cap_add:
4026
- NET_ADMIN
4127
- SYS_MODULE
42-
# sysctls:
43-
# - net.ipv4.ip_forward=1
44-
# - net.ipv4.conf.all.src_valid_mark=1
45-
# - net.ipv6.conf.all.disable_ipv6=0
46-
# - net.ipv6.conf.all.forwarding=1
47-
# - net.ipv6.conf.default.forwarding=1
28+
runtime: nvidia
4829
deploy:
4930
resources:
5031
reservations:
5132
devices:
5233
- driver: nvidia
5334
capabilities: [gpu]
54-
count: 1
55-
56-
# networks:
57-
# macvlan_ros1_network:
58-
# driver: ipvlan # using macvlan is faster but prevents the host from connecting to it direcly
59-
# driver_opts:
60-
# ipvlan_mode: l3
61-
# parent: enxa0cec8831e24 # <- Update to match your NIC
62-
# ipam:
63-
# config:
64-
# - subnet: 150.164.212.0/24 # <-- Update
65-
# gateway: 150.164.212.1 # <-- Update
66-
# ip_range: 150.164.212.0/24 # <-- Update
35+
count: 1

compose_macos_host.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
ros1:
3+
container_name: ros1_noetic_devel
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
ipc: host
8+
pid: host
9+
privileged: true
10+
network_mode: bridge
11+
ports:
12+
- "3080:3080"
13+
- "3081:3000"
14+
- "3022:3022"
15+
environment:
16+
- DISPLAY=${DISPLAY:-:0}
17+
- NVIDIA_DRIVER_CAPABILITIES=all
18+
- TZ=${TZ:-UTC}
19+
- ROS_LOG_DIR=/var/log/val_logger/noetic_devel
20+
- ROS_MASTER_URI=http://localhost:11311/
21+
volumes:
22+
- ${localWorkspaceFolder:-./local_mount}:/home/ubuntu/ros_ws
23+
- /etc/localtime:/etc/localtime:ro
24+
- /etc/timezone:/etc/timezone:ro
25+
- /tmp/.X11-unix:/tmp/.X11-unix
26+
- /var/log/val_logger:/var/log/val_logger
27+
cap_add:
28+
- NET_ADMIN
29+
- SYS_MODULE

0 commit comments

Comments
 (0)