feat(workflows/docker): add workflow to build docker images (#191)

This commit is contained in:
Xuehai Pan 2025-11-11 15:57:18 +08:00 committed by GitHub
parent 466f4f57b4
commit ffc344d379
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 133 additions and 11 deletions

View file

@ -313,9 +313,7 @@ Press <kbd>h</kbd> for help or <kbd>q</kbd> to return to the terminal. See [Keyb
Build and run the Docker image with [nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-container-toolkit):
```bash
git clone --depth=1 https://github.com/XuehaiPan/nvitop.git && cd nvitop # clone this repo first
docker build --tag nvitop:latest . # build the Docker image
docker run -it --rm --runtime=nvidia --gpus=all --pid=host nvitop:latest # run the Docker container
docker run -it --rm --runtime=nvidia --gpus=all --pid=host ghcr.io/xuehaipan/nvitop:latest
```
**NOTE:** Don't forget to add the `--pid=host` option when running the container.