Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Fixed incorrect port, added docker provider to gradio UI
Dillon DuPont1718e57bd359
diff --git a/libs/python/agent/agent/ui/gradio/ui_components.py b/libs/python/agent/agent/ui/gradio/ui_components.pyindex c601fb6c3c..bc6978f73b 100644--- a/libs/python/agent/agent/ui/gradio/ui_components.py+++ b/libs/python/agent/agent/ui/gradio/ui_components.py@@ -187,7 +187,7 @@ if __name__ == "__main__":"""<div style="display: flex; justify-content: center; margin-bottom: 0.5em"><img alt="CUA Logo" style="width: 80px;"- src="https://github.com/trycua/cua/blob/main/img/logo_black.png?raw=true" />+ src="https://github.com/trycua/cua/blob/main/img/logo_white.png?raw=true" /></div>""")@@ -201,22 +201,33 @@ if __name__ == "__main__":)with gr.Accordion("Computer Configuration", open=True):- computer_os = gr.Radio(- choices=["macos", "linux", "windows"],- label="Operating System",- value="macos",- info="Select the operating system for the computer",- )-is_windows = platform.system().lower() == "windows"is_mac = platform.system().lower() == "darwin"- providers = ["cloud", "localhost"]+ providers = ["cloud", "localhost", "docker"]if is_mac:providers += ["lume"]if is_windows:providers += ["winsandbox"]+ # Remove unavailable options+ # MacOS is unavailable if Lume is not available+ # Windows is unavailable if Winsandbox is not available+ # Linux is always available+ # This should be removed once we support macOS and Windows on the cloud provider+ computer_choices = ["macos", "linux", "windows"]+ if not is_mac or "lume" not in providers:+ computer_choices.remove("macos")+ if not is_windows or "winsandbox" not in providers:+ computer_choices.remove("windows")++ computer_os = gr.Radio(+ choices=computer_choices,+ label="Operating System",+ value=computer_choices[0],+ info="Select the operating system for the computer",+ )+computer_provider = gr.Radio(choices=providers,label="Provider",diff --git a/libs/python/computer/computer/computer.py b/libs/python/computer/computer/computer.pyindex 644aaa3185..59b074c81f 100644--- a/libs/python/computer/computer/computer.py+++ b/libs/python/computer/computer/computer.py@@ -43,7 +43,7 @@ class Computer:cpu: str = "4",os_type: OSType = "macos",name: str = "",- image: str = "macos-sequoia-cua:latest",+ image: Optional[str] = None,shared_directories: Optional[List[str]] = None,use_host_computer_server: bool = False,verbosity: Union[int, LogLevel] = logging.INFO,@@ -88,6 +88,12 @@ class Computer:self.logger = Logger("computer", verbosity)self.logger.info("Initializing Computer...")+ if os_type == "macos":+ image = "macos-sequoia-cua:latest"+ elif os_type == "linux":+ image = "trycua/cua-ubuntu:latest"+ image = str(image)+# Store original parametersself.image = imageself.port = port@@ -310,7 +316,7 @@ class Computer:host=host,storage=storage,shared_path=shared_path,- image=image or "cua-ubuntu:latest",+ image=image or "trycua/cua-ubuntu:latest",verbose=verbose,ephemeral=ephemeral,noVNC_port=noVNC_port,diff --git a/libs/python/computer/computer/providers/docker/provider.py b/libs/python/computer/computer/providers/docker/provider.pyindex 28ab9a5fc1..6aacba486a 100644--- a/libs/python/computer/computer/providers/docker/provider.py+++ b/libs/python/computer/computer/providers/docker/provider.py@@ -41,7 +41,7 @@ class DockerProvider(BaseVMProvider):host: str = "localhost",storage: Optional[str] = None,shared_path: Optional[str] = None,- image: str = "cua-ubuntu:latest",+ image: str = "trycua/cua-ubuntu:latest",verbose: bool = False,ephemeral: bool = False,vnc_port: Optional[int] = 6901,@@ -49,17 +49,17 @@ class DockerProvider(BaseVMProvider):"""Initialize the Docker VM Provider.Args:- port: Port for the computer-server API (default: 8000)+ port: Currently unused (VM provider port)host: Hostname for the API server (default: localhost)storage: Path for persistent VM storageshared_path: Path for shared folder between host and container- image: Docker image to use (default: "cua-ubuntu:latest")+ image: Docker image to use (default: "trycua/cua-ubuntu:latest")verbose: Enable verbose loggingephemeral: Use ephemeral (temporary) storagevnc_port: Port for VNC interface (default: 6901)"""self.host = host- self.api_port = 8080 if port is None else port+ self.api_port = 8000self.vnc_port = vnc_portself.ephemeral = ephemeraldiff --git a/libs/python/computer/computer/providers/factory.py b/libs/python/computer/computer/providers/factory.pyindex 6776ed4d98..b95c2c6143 100644--- a/libs/python/computer/computer/providers/factory.py+++ b/libs/python/computer/computer/providers/factory.py@@ -147,7 +147,7 @@ class VMProviderFactory:host=host,storage=storage,shared_path=shared_path,- image=image or "cua-ubuntu:latest",+ image=image or "trycua/cua-ubuntu:latest",verbose=verbose,ephemeral=ephemeral,vnc_port=noVNC_port