amd-smi
Official
https://rocm.docs.amd.com/projects/amdsmi/en/latest/how-to/amdsmi-py-lib.html
https://rocm.docs.amd.com/projects/amdsmi/en/latest/reference/amdsmi-py-api.html
Clone Source Code
https://github.com/ROCm/amdsmi
Change Branch
Build amdsmi
Change Ubuntu Mirrors
https://mirrors.huaweicloud.com/mirrorDetail/5ea14ecab05943f36fb75ee7?mirrorName=ubuntu&catalog=os
Add under line before apt update
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list \
&& sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list
Update Python binding
Unofficial Python binding
Notice:
Need libamd_smi.so!
https://github.com/ml-energy/amdsmi