services: fastsam_ros: build: . container_name: fastsam_ros command: roslaunch fastsam_ros segment.launch # command: sh entrypoint: /ros_entrypoint.sh runtime: nvidia environment: - DISPLAY - QT_X11_NO_MITSHM=1 - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=all volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw - ./:/catkin_ws/src network_mode: host privileged: true stdin_open: true tty: true # If you need visualization, make sure to run `xhost +local:docker` first.