Skip to content

Instantly share code, notes, and snippets.

@jlblancoc
Created February 11, 2025 09:10
Show Gist options
  • Save jlblancoc/e2ca6e400c5d080045800b6ec7beaff8 to your computer and use it in GitHub Desktop.
Save jlblancoc/e2ca6e400c5d080045800b6ec7beaff8 to your computer and use it in GitHub Desktop.
Docker compose config for X11 / GUI
services:
mola-core:
#restart: always
build:
context: ./
dockerfile: ./docker/Dockerfile
args:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- CYCLONEDDS_URI=file:///root/ros2_ws/cylconedds_config.xml
network_mode: host
stdin_open: true
tty: true
runtime: nvidia
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- XAUTHORITY=${XAUTH}
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- ROS_DISTRO=jazzy
- ROS_DOMAIN_ID=5
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- CYCLONEDDS_URI=file:///root/ros2_ws/cylconedds_config.xml
container_name: mola-core
privileged: false
cap_add:
- NET_ADMIN
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ./mola_lidar_odometry:/root/ros2_ws/src/mola_lidar_odometry
command: bash
deploy:
resources:
reservations:
devices:
- driver: 'nvidia'
count: all
capabilities: [gpu]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment