restructure per-image dirs + onpush paths filter; add beszel-agent-gpu image
This commit is contained in:
1 parent
c0306bba7f
commit
b823333d5d
7 files changed
+178
-17
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# beszel-agent chính thức chạy trong môi trường có glibc.
|
||||
#
|
||||
# Tại sao không dùng henrygd/beszel-agent trực tiếp: image chính thức là
|
||||
# distroless (không có glibc / dynamic linker) nên nvidia-smi được NVIDIA
|
||||
# Container Toolkit inject vào container (binary link glibc) không thể exec,
|
||||
# và binary phát hành build không có tag `glibc` nên NVML chỉ là stub —
|
||||
# GPU NVIDIA do đó không bao giờ được báo cáo. Ubuntu cung cấp glibc cho
|
||||
# phép nvidia-smi chạy để agent thu thập GPU stats.
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# TLS: image ubuntu gốc không kèm CA bundle, thiếu nó agent không verify được
|
||||
# chứng chỉ của hub (x509: certificate signed by unknown authority).
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Binary Go tĩnh từ image chính thức + bảng id GPU AMD (giữ parity).
|
||||
COPY --from=henrygd/beszel-agent /agent /agent
|
||||
COPY --from=henrygd/beszel-agent /usr/share/libdrm/amdgpu.ids /usr/share/libdrm/amdgpu.ids
|
||||
|
||||
ENTRYPOINT ["/agent"]
|
||||
@@ -0,0 +1,41 @@
|
||||
# beszel-agent-gpu
|
||||
|
||||
[beszel-agent](https://github.com/henrygd/beszel) chạy trong môi trường glibc để thu thập được GPU stats NVIDIA, thay cho image distroless chính thức (xem chú thích trong [Dockerfile](Dockerfile)).
|
||||
|
||||
## Tags
|
||||
|
||||
- `git.thuanle.me/public/beszel-agent-gpu:latest` — manifest trỏ `amd64-latest`
|
||||
- `git.thuanle.me/public/beszel-agent-gpu:amd64-latest`
|
||||
|
||||
## Sử dụng (server có NVIDIA GPU)
|
||||
|
||||
```yaml
|
||||
services:
|
||||
beszel-agent:
|
||||
image: git.thuanle.me/public/beszel-agent-gpu:latest
|
||||
container_name: beszel-agent
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true
|
||||
network_mode: host
|
||||
# GPU: agent chạy nvidia-smi do NVIDIA Container Toolkit inject
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./beszel_agent_data:/var/lib/beszel-agent
|
||||
environment:
|
||||
LISTEN: 45876
|
||||
KEY: '<public key từ hub>'
|
||||
HUB_URL: https://bz.thuanle.me
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
- Build lại tự động mỗi Chủ nhật 02:30 UTC với `--pull` — luôn lấy binary agent mới nhất từ `henrygd/beszel-agent`.
|
||||
- Server tiêu thụ (ta) chạy watchtower `--label-enable`, nên container tự update sau khi image mới được push.
|
||||
Reference in new issue
Block a user