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/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}, 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