diff --git a/solara/__main__.py b/solara/__main__.py index ff8a4edb5..02aa7a4a6 100644 --- a/solara/__main__.py +++ b/solara/__main__.py @@ -326,6 +326,7 @@ def open_browser(): if open: threading.Thread(target=open_browser, daemon=True).start() + rich.print(f"Solara server is starting at {url}") if log_level is not None: diff --git a/solara/server/settings.py b/solara/server/settings.py index 4a62a39e4..fdcbd3d09 100644 --- a/solara/server/settings.py +++ b/solara/server/settings.py @@ -4,6 +4,7 @@ import uuid from enum import Enum from pathlib import Path +import re from typing import Optional import pydantic @@ -120,7 +121,9 @@ class Config: HOST_DEFAULT = os.environ.get("HOST", "localhost") -if "arm64-apple-darwin" in HOST_DEFAULT: # conda activate script +is_mac_os_conda = "arm64-apple-darwin" in HOST_DEFAULT +is_wsl_windows = re.match(r".*?-w1[0-9]", HOST_DEFAULT) +if is_mac_os_conda or is_wsl_windows: HOST_DEFAULT = "localhost"