test(unraid): record CUDA and NDI runtime versions
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
import ctypes
|
||||||
|
import glob
|
||||||
|
import importlib.metadata
|
||||||
|
import json
|
||||||
|
import platform
|
||||||
|
|
||||||
|
import torch
|
||||||
|
|
||||||
|
packages = ["torch", "torchvision", "mmcv", "mmengine", "mmdet", "mmpose", "numpy",
|
||||||
|
"opencv-python-headless", "cyndilib", "fastapi", "uvicorn", "websockets", "psutil", "nvidia-ml-py"]
|
||||||
|
ndi_path = glob.glob("/opt/conda/lib/python3.10/site-packages/cyndilib/wrapper/bin/*/libndi.so")[0]
|
||||||
|
ndi = ctypes.CDLL(ndi_path)
|
||||||
|
ndi.NDIlib_version.restype = ctypes.c_char_p
|
||||||
|
print(json.dumps({
|
||||||
|
"python": platform.python_version(), "packages": {p: importlib.metadata.version(p) for p in packages},
|
||||||
|
"torch_cuda_build": torch.version.cuda, "cudnn": torch.backends.cudnn.version(),
|
||||||
|
"cuda_available": torch.cuda.is_available(), "cuda_device": torch.cuda.get_device_name(0),
|
||||||
|
"ndi_runtime_version": ndi.NDIlib_version().decode(), "ndi_runtime_path": ndi_path,
|
||||||
|
}, indent=2))
|
||||||
@@ -134,6 +134,7 @@ services:
|
|||||||
python -m pytest -q /tests > /validation/unit-tests.txt 2>&1
|
python -m pytest -q /tests > /validation/unit-tests.txt 2>&1
|
||||||
python /app/tail2/validate_runtime.py > /validation/runtime.json
|
python /app/tail2/validate_runtime.py > /validation/runtime.json
|
||||||
python -m pip freeze | sort > /validation/pip-freeze.txt
|
python -m pip freeze | sort > /validation/pip-freeze.txt
|
||||||
|
python /app/tail2/version_report.py > /validation/runtime-versions.json
|
||||||
find / -xdev -type f -name 'libndi.so*' -print > /validation/ndi-runtime-files.txt 2>/dev/null || true
|
find / -xdev -type f -name 'libndi.so*' -print > /validation/ndi-runtime-files.txt 2>/dev/null || true
|
||||||
nvidia-smi --query-gpu=name,driver_version,memory.total,memory.used,temperature.gpu --format=csv,noheader > /validation/gpu.csv
|
nvidia-smi --query-gpu=name,driver_version,memory.total,memory.used,temperature.gpu --format=csv,noheader > /validation/gpu.csv
|
||||||
sha256sum /models/*.pth > /validation/model-sha256.txt
|
sha256sum /models/*.pth > /validation/model-sha256.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user