fix(turtlebot3): resolve port conflict between CPU and NVIDIA profiles#19
Merged
fix(turtlebot3): resolve port conflict between CPU and NVIDIA profiles#19
Conversation
- Add cpu/nvidia profiles to prevent simultaneous service startup - Add stop-demo.sh script for clean shutdown with --volumes/--images options - Add --update flag to pull latest images before running - Add --attached flag for foreground mode (daemon mode is now default) - Update README with daemon mode instructions and new scripts - Add instructions for viewing logs and interacting with ROS 2 in containers Fixes port 8080 conflict when running with --nvidia flag where both turtlebot3-demo and turtlebot3-demo-nvidia services tried to bind to the same port. Now --profile cpu (default) or --profile nvidia must be explicitly specified, ensuring mutual exclusivity. Changes: - docker-compose.yml: Add profiles=['cpu'] to default service - run-demo.sh: Default to --profile cpu, add daemon mode with -d flag - stop-demo.sh: New script for stopping containers with cleanup options - README.md: Update Quick Start, add daemon mode docs, add stop script
There was a problem hiding this comment.
Pull request overview
This PR updates the TurtleBot3 integration demo to fix a Docker Compose profile issue that caused port 8080 conflicts between CPU and NVIDIA variants, and improves container lifecycle management and documentation.
Changes:
- Assigns a
cpuprofile to the defaultturtlebot3-demoservice and defaults the launcher script to--profile cpu, ensuring mutual exclusivity with the NVIDIA profile and eliminating the port conflict. - Extends
run-demo.shwith--updateand--attachedflags, and makes detached (daemon) mode the default, including clearer post-launch guidance for logs and ROS 2 interaction. - Adds a
stop-demo.shhelper for stopping containers (with optional volume and image cleanup) and updates the README to reflect daemon-mode usage, profiling, and the new stop script.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
demos/turtlebot3_integration/docker-compose.yml |
Adds profiles: ["cpu"] to the default TurtleBot3 service and clarifies how to use CPU vs NVIDIA profiles, resolving the 8080 port collision. |
demos/turtlebot3_integration/run-demo.sh |
Introduces --profile cpu as the default, adds --update and --attached flags, supports daemon vs foreground modes, and prints explicit commands for viewing logs and accessing ROS 2 in containers. |
demos/turtlebot3_integration/stop-demo.sh |
New script that runs docker compose/docker-compose down with optional volume (-v) and image (--rmi all) cleanup and restores X11 permissions. |
demos/turtlebot3_integration/README.md |
Updates Quick Start and NVIDIA sections to use profiles (cpu/nvidia), documents daemon-mode behavior, log viewing, ROS 2 CLI usage in containers, and the new stop-demo.sh script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mfaferek93
approved these changes
Jan 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes port 8080 conflict when running with --nvidia flag where both turtlebot3-demo and turtlebot3-demo-nvidia services tried to bind to the same port. Now --profile cpu (default) or --profile nvidia must be explicitly specified, ensuring mutual exclusivity.
Changes:
Related Issue
closes #18
Checklist