-
Notifications
You must be signed in to change notification settings - Fork 558
Make Docker optional #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Make Docker optional #209
Conversation
# Defer to self for inside_docker | ||
"inside_docker": self.inside_docker, | ||
} | ||
if self.run_without_docker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed so that if ran with --run-without-docker it does not get overriden
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes Docker optional by introducing a --run-without-docker
flag to disable Docker-dependent features (coder agent, file surfer agent, and live browser view) and propagates the new flag through configuration, CLI commands, backend managers, frontend store, and documentation.
- Added
run_without_docker
toMagenticUIConfig
, CLI options, HTTP app startup, and dependency injection. - Updated browser initialization and agent inclusion logic to respect the new flag.
- Updated defaults (headless browser), README, and frontend store to reflect optional Docker mode.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/magentic_ui/tools/playwright/browser/utils.py | Updated default headless to True for browser resources |
src/magentic_ui/task_team.py | Modified get_task_team to pass and respect run_without_docker , and conditionally include agents |
src/magentic_ui/magentic_ui_config.py | Added run_without_docker field and updated default browser_headless |
src/magentic_ui/backend/web/managers/connection.py | Extended WebSocketManager to accept and store run_without_docker |
src/magentic_ui/backend/web/deps.py | Passed run_without_docker to init_managers |
src/magentic_ui/backend/web/app.py | Injected RUN_WITHOUT_DOCKER env var into Uvicorn lifecycle |
src/magentic_ui/backend/teammanager/teammanager.py | Updated TeamManager to skip browser setup and agent inclusion when run_without_docker |
src/magentic_ui/backend/cli.py | Added Typer option --run-without-docker and conditional Docker setup |
src/magentic_ui/_cli.py | Added legacy CLI flag --run-without-docker |
frontend/src/components/store.tsx | Exposed run_without_docker and browser_headless in frontend config |
README.md | Documented usage of --run-without-docker and updated command examples |
Comments suppressed due to low confidence (3)
src/magentic_ui/backend/web/managers/connection.py:52
- The docstring lists 'run_without_docker' before 'config', but the init signature orders 'config' before 'run_without_docker'. Please reorder the doc entries to match the signature.
run_without_docker (bool): Flag indicating if the application is running without docker
src/magentic_ui/task_team.py:201
- [nitpick] Consider adding unit tests to cover the
run_without_docker
branch to ensure coder and file_surfer agents are skipped as expected.
if not magentic_ui_config.run_without_docker:
src/magentic_ui/backend/teammanager/teammanager.py:152
- [nitpick] Add unit tests to verify that
novnc_port
andplaywright_port
are set to -1 whenrun_without_docker
is true, and that no browser is launched.
if not self.run_without_docker:
Introduced a new toggle for enabling/disabling headless mode for the browser, applicable when running without Docker. Added a tooltip for user guidance.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Got the following error when running the default To my understanding, when running normally and then turning that setting off, the system tries to look for the Two solutions would be to either (1) only show the toggleable option to users if they are running with the Error trace below:
|
Same error when running |
Great catch! Fixed now by ignoring the toggle when running in docker. |
Updated the logic for the run_without_docker parameter to default to True and allow configuration from settings_config for browser_headless. This enhances flexibility in managing the application's behavior when not using Docker.
…to docker_optional
Make docker optional with command
If you are not able to setup Docker, you can run a limited version of Magentic-UI which does not have the ability to execute code, navigate files or display the browser in the interface with the command:
You can also run Magentic-UI in a command-line-interface: