Support Docker VM manager and provider (#75)

* Add docker provider framework

* Update VM download link

* Add stop container

* Update docker manager & provider

* Update

* Update

* Update provider
This commit is contained in:
HappySix
2024-09-28 21:10:40 +08:00
committed by GitHub
parent 3b94cb4b74
commit 6419d707bc
10 changed files with 256 additions and 44 deletions

View File

@@ -12,9 +12,10 @@ logger = logging.getLogger("desktopenv.pycontroller")
class PythonController:
def __init__(self, vm_ip: str,
server_port: int,
pkgs_prefix: str = "import pyautogui; import time; pyautogui.FAILSAFE = False; {command}"):
self.vm_ip = vm_ip
self.http_server = f"http://{vm_ip}:5000"
self.http_server = f"http://{vm_ip}:{server_port}"
self.pkgs_prefix = pkgs_prefix # fixme: this is a hacky way to execute python commands. fix it and combine it with installation of packages
self.retry_times = 3
self.retry_interval = 5