mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Formatting
This commit is contained in:
parent
b3bb2188b8
commit
e71e768e4f
@ -926,9 +926,15 @@ def get_nvidia_gpu_stats() -> dict[str, str]:
|
||||
"--format=csv",
|
||||
]
|
||||
|
||||
if "CUDA_VISIBLE_DEVICES" in os.environ and os.environ["CUDA_VISIBLE_DEVICES"].isdigit():
|
||||
if (
|
||||
"CUDA_VISIBLE_DEVICES" in os.environ
|
||||
and os.environ["CUDA_VISIBLE_DEVICES"].isdigit()
|
||||
):
|
||||
nvidia_smi_command.extend(["--id", os.environ['CUDA_VISIBLE_DEVICES']])
|
||||
elif "NVIDIA_VISIBLE_DEVICES" in os.environ and os.environ["NVIDIA_VISIBLE_DEVICES"].isdigit():
|
||||
elif (
|
||||
"NVIDIA_VISIBLE_DEVICES" in os.environ
|
||||
and os.environ["NVIDIA_VISIBLE_DEVICES"].isdigit()
|
||||
):
|
||||
nvidia_smi_command.extend(["--id", os.environ['NVIDIA_VISIBLE_DEVICES']])
|
||||
|
||||
p = sp.run(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user