Update docker manager & provider

This commit is contained in:
FredWuCZ
2024-09-28 10:40:27 +08:00
parent da18f2f6e9
commit 5552ac9dcf
6 changed files with 89 additions and 308 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