diff --git a/docker-compose.yml b/docker-compose.yml index 4490905..217671f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: gui-tools: env_file: @@ -9,44 +7,40 @@ services: environment: # Display settings - - DISPLAY=${DISPLAY} - - WAYLAND_DISPLAY=${WAYLAND_DISPLAY} - # - QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-xcb} # Default to X11 - # If running with Wayland - - XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} - - ROS_MASTER_URI=http://ros-master:11311 - # - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility - # - NVIDIA_VISIBLE_DEVICES=all + DISPLAY: "${DISPLAY}" + WAYLAND_DISPLAY: "${WAYLAND_DISPLAY}" + # Uncomment below if using X11 + # QT_QPA_PLATFORM: "${QT_QPA_PLATFORM:-xcb}" + XDG_RUNTIME_DIR: "${XDG_RUNTIME_DIR}" + ROS_MASTER_URI: "http://ros-master:11311" + volumes: # X11 socket - /tmp/.X11-unix:/tmp/.X11-unix - ${XAUTHORITY:-~/.Xauthority}:/root/.Xauthority # Wayland socket #- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0 - # Allow access to the host's GPU + # Access to GPU devices - /dev/dri:/dev/dri - #Auto reload on code changes + # Code and configuration - ./guiTools/spiri_sdk_guitools/:/app/spiri_sdk_guitools/ - # Enable launching the SDK from the SDK - # - ./:/app/sdk - ./robots:/robots - /var/run/docker.sock:/var/run/docker.sock + devices: - # Provide access to GPU devices + # Provide access to GPU devices (supports non-NVIDIA GPUs) - /dev/dri:/dev/dri + network_mode: host ports: - 8923:8923 ipc: host - #user: "${UID}:${GID}" - privileged: true # Allow privileged access if necessary (e.g., for GPU access) - # restart: unless-stopped - # command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition - deploy: - resources: - reservations: - devices: - - driver: cdi - device_ids: - - nvidia.com/gpu=all + privileged: true # Required for GPU access + # deploy: + # resources: + # reservations: + # devices: + # - driver: cdi # Optional for advanced resource scheduling + # device_ids: + # - "all" # Use "all" for all available GPUs