From b4427f4ab4f8a826ff79ceb05f82a50371000f43 Mon Sep 17 00:00:00 2001 From: GoldenAnpu Date: Fri, 9 Jan 2026 14:41:31 +0000 Subject: [PATCH 1/2] Fix cap_add syntax to use a list in net client configuration --- agent/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/main.py b/agent/main.py index 1fa41b8..5a5e050 100644 --- a/agent/main.py +++ b/agent/main.py @@ -129,7 +129,7 @@ def _start_net_client(docker_api=None): name=f"{net_container_name}_{sly.rand_str(5)}", command=command, network=network, - cap_add="NET_ADMIN", + cap_add=["NET_ADMIN"], volumes=volumes, privileged=True, restart_policy={"Name": "always", "MaximumRetryCount": 0}, From f1e23d17741f55f633cfb0d0ea0e46581430d22e Mon Sep 17 00:00:00 2001 From: GoldenAnpu Date: Fri, 9 Jan 2026 16:38:48 +0000 Subject: [PATCH 2/2] Update launch.json to use debugpy as the debugger type for Python configurations; enhance logging in agent_utils.py for nvidia-smi failures --- .vscode/launch.json | 6 +++--- agent/worker/agent_utils.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 85601ba..a7b298c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "configurations": [ { "name": "main.py", - "type": "python", + "type": "debugpy", "request": "launch", "program": "agent/main.py", "console": "integratedTerminal", @@ -19,7 +19,7 @@ }, { "name": "devcontainer main.py", - "type": "python", + "type": "debugpy", "request": "launch", "program": "agent/main.py", "console": "integratedTerminal", @@ -34,7 +34,7 @@ }, { "name": "Python: Debug Tests", - "type": "python", + "type": "debugpy", "request": "launch", "program": "${file}", "purpose": [ diff --git a/agent/worker/agent_utils.py b/agent/worker/agent_utils.py index 66017cd..a14dd27 100644 --- a/agent/worker/agent_utils.py +++ b/agent/worker/agent_utils.py @@ -1091,7 +1091,8 @@ def nvidia_runtime_is_available(): ) return True except Exception as e: - sly.logger.warning(f"Failed to run nvidia-smi:", exc_info=True) + sly.logger.warning(f"Failed to run nvidia-smi: {str(e)}") + sly.logger.debug("Failed to run nvidia-smi.Full traceback:", exc_info=True) return False