mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Fix browse_website headless mode for Firefox (#2816)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
@@ -78,6 +78,9 @@ def scrape_text_with_selenium(url: str) -> tuple[WebDriver, str]:
|
||||
)
|
||||
|
||||
if CFG.selenium_web_browser == "firefox":
|
||||
if CFG.selenium_headless:
|
||||
options.headless = True
|
||||
options.add_argument("--disable-gpu")
|
||||
driver = webdriver.Firefox(
|
||||
executable_path=GeckoDriverManager().install(), options=options
|
||||
)
|
||||
@@ -92,7 +95,7 @@ def scrape_text_with_selenium(url: str) -> tuple[WebDriver, str]:
|
||||
|
||||
options.add_argument("--no-sandbox")
|
||||
if CFG.selenium_headless:
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--headless=new")
|
||||
options.add_argument("--disable-gpu")
|
||||
|
||||
chromium_driver_path = Path("/usr/bin/chromedriver")
|
||||
|
||||
@@ -64,6 +64,10 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt
|
||||
templates in the [repository].
|
||||
6. Continue to [Run with Docker](#run-with-docker)
|
||||
|
||||
!!! note "Docker only supports headless browsing"
|
||||
Auto-GPT uses a browser in headless mode by default: `HEADLESS_BROWSER=True`.
|
||||
Please do not change this setting in combination with Docker, or Auto-GPT will crash.
|
||||
|
||||
[Docker Hub]: https://hub.docker.com/r/significantgravitas/auto-gpt
|
||||
[repository]: https://github.com/Significant-Gravitas/Auto-GPT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user