diff --git a/Dockerfile b/Dockerfile index 66eb1ff..dc92061 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,4 +61,23 @@ RUN echo 'runtime-endpoint: unix:///run/containerd/containerd.sock' >> /etc/cric RUN echo 'image-endpoint: unix:///run/containerd/containerd.sock' >> /etc/crictl.yaml RUN echo 'timeout: 2' >> /etc/crictl.yaml +# Install amd-smi (ROCm standalone; for AMD GPU node debugging) +ARG ROCM_MAJOR_MINOR="7.14" +ARG ROCM_PKG_VERSION="7.14.0-3" + +RUN mkdir --parents --mode=0755 /etc/apt/keyrings && \ + wget https://repo.amd.com/rocm/packages-multi-arch/gpg/rocm.gpg -O - | \ + gpg --dearmor | tee /etc/apt/keyrings/amdrocm.gpg > /dev/null && \ + echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/amdrocm.gpg] https://repo.amd.com/rocm/packages-multi-arch/debian13 stable main" \ + > /etc/apt/sources.list.d/rocm.list && \ + apt-get update -qq && \ + apt-get install -y "amdrocm-amdsmi${ROCM_MAJOR_MINOR}=${ROCM_PKG_VERSION}" && \ + echo "/opt/rocm/core-${ROCM_MAJOR_MINOR}/lib" > /etc/ld.so.conf.d/amd-rocm-smi.conf && \ + ldconfig && \ + ln -sf "/opt/rocm/core-${ROCM_MAJOR_MINOR}/bin/amd-smi" /usr/local/bin/amd-smi && \ + rm -f /etc/apt/sources.list.d/rocm.list && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + rm /etc/apt/keyrings/amdrocm.gpg + + CMD [ "/bin/bash" ] diff --git a/README.md b/README.md index 98e52f3..dce33ea 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Once you're in, you have access to the set of tools listed in the `Dockerfile`. - [`atop`](https://www.atoptool.nl/) - is an advanced interactive monitor for Linux-systems to view the load on system-level and process-level. - [`wget`](https://www.gnu.org/software/wget/) - for retrieving files using HTTP, HTTPS, FTP and FTPS. - [`crictl`](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md) - A CLI for CRI endpoints. Configured to use `/run/containerd/containerd.sock` as a default endpoint. + - [`amd-smi`](https://rocm.docs.amd.com/projects/amdsmi/en/docs-7.14.0/index.html) - AMD GPU system management CLI (ROCm 7.14 standalone `amdrocm-amdsmi`). Use on AMD GPU nodes from the container shell: (e.g. `amd-smi version`, `amd-smi list`). # Tips and Tricks ## chroot + systemctl