Files
ubuntu-bare-metal/coding-agent/STATE.md
T
tomasz-syn-grzegorza 359afb3a59 Initial import: bare-metal stacks, Server UI, GPU fan, tutorials.
Infrastructure configs for GMKtec K11 (Docker, vLLM, LocalAI, ComfyUI,
control-plane, gpu-fan agent, Server UI with CLI/file explorer/GPU fan curve).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 12:02:04 +00:00

148 lines
5.6 KiB
Markdown

# Stan systemu i repo
Snapshot na koniec sesji. Weryfikuj na serwerze przed działaniem (`docker ps`, `mountpoint /data`).
## Co działa
| Komponent | Status | Uwagi |
|-----------|--------|-------|
| Docker CE | OK | Root: `/data/docker` |
| NVIDIA driver | OK | ~595.x, `nvidia-smi` na hoście |
| GPU w kontenerze | OK | `--gpus all` testowany wcześniej |
| Mount `/data` | OK | ~1 TB, ext4, fstab UUID |
| vLLM image | OK | `vllm/vllm-openai:latest` pulled |
| vLLM container | STOP | `VLLM_MODEL` puste |
| LocalAI image | OK | `v4.4.3-gpu-nvidia-cuda-13` |
| LocalAI container | RUN | profil `localai`, port host **8070** |
| Server UI | stack w repo | `stacks/server-ui/` :8091 — native (systemd) lub Docker; zakładki: **CLI**, Pliki, Stacki, GPU Fan |
| gpu-fan agent | host systemd | `/opt/gpu-fan` :18090 localhost — **nie w `docker ps`** |
| ComfyUI | stack w repo | `stacks/comfyui/`**nie uruchomiony na hoście** (rozdział 07) |
| Firewall / TLS | — | nie wdrożony (rozdział 07) |
## Ścieżki na `/data`
```
/data/
├── docker/ # obrazy i warstwy Docker
└── apps/
├── vllm/huggingface/ # cache HF (AWQ) — bez pobranego modelu
├── gguf/
│ ├── qwen3.6-27b/ # pod GGUF z katalogu vLLM
│ └── gemma-4-12b/
├── localai/
│ ├── models/ # modele LocalAI (pobieranie w toku)
│ ├── backends/
│ ├── configuration/ # api_keys.json, runtime_settings.json
│ ├── images/
│ └── data/ # auth DB, agents (przyszłe LOCALAI_AUTH)
└── comfyui/ # rozdział 07
├── storage/
├── models/
├── cache/hf-hub/
├── cache/torch-hub/
├── input/
├── output/
├── custom_nodes/
└── workflows/
```
## Pliki `.env` na serwerze (nie w git)
| Plik | Kluczowe ustawienia |
|------|---------------------|
| `/opt/control-plane/.env` | `API_KEY`, `SERVER_UI_*`, `GPU_FAN_*`**jedyny** klucz panelu; instrukcja: [`04a-api-key.md`](../manual-tutorial/04a-api-key.md) |
| `stacks/vllm/.env` | `VLLM_MODEL=` (puste), `MAX_MODEL_LEN=131072`, port 8000 |
| `stacks/localai/.env` | `LOCALAI_PORT=8070`, `LOCALAI_API_KEY` ustawiony (sekret), obraz cuda-13 |
## Porty stacków (Server UI)
| Stack | Zmienna `.env` | Domyślny | Edycja w UI |
|-------|----------------|----------|-------------|
| LocalAI | `LOCALAI_PORT` | 8080 | tak |
| ComfyUI | `COMFYUI_PORT` | 8188 | tak |
| vLLM | `VLLM_PORT` | 8000 | tak |
| NPMPlus | — (host network) | 81 | nie (read-only) |
Szczegóły: [`SERVER-UI-PORT-CONFIG.md`](SERVER-UI-PORT-CONFIG.md)
## Control plane (instalacja)
| Komponent | Runtime | Instalator |
|-----------|---------|------------|
| gpu-fan | systemd native only | `install-control-plane.sh` lub `gpu-fan/scripts/install.sh` |
| Server UI | systemd **lub** Docker | `install-control-plane.sh`, `install.sh`, `install-docker.sh` |
Szczegóły: [`SERVER-UI-INSTALL-OPTIONS.md`](SERVER-UI-INSTALL-OPTIONS.md), [`CONTROL-PLANE-ENV.md`](CONTROL-PLANE-ENV.md), [`SERVER-UI-FILE-EXPLORER.md`](SERVER-UI-FILE-EXPLORER.md), tutorial [`08-server-ui-install.md`](../manual-tutorial/08-server-ui-install.md)
## Struktura repo (kluczowe pliki)
```
ubuntu-bare-metal/
├── README.md
├── scripts/setup-data-disk.sh
├── coding-agent/ # ten katalog
├── manual-tutorial/
│ ├── 00-prerequisites.md
│ ├── 01-system-update-and-docker.md
│ ├── 02-nvidia-driver.md
│ ├── 03-nvidia-container-toolkit.md
│ ├── 03b-system-tools.md
│ ├── 04-vllm-stack.md # część A dysk + część B vLLM
│ └── 05-localai-stack.md
│ ├── 06-gpu-fan-control.md
│ └── 07-comfyui-stack.md
└── stacks/
├── vllm/
│ ├── models.catalog.yaml
│ ├── docker-compose.yml
│ ├── profiles/
│ └── scripts/
├── localai/
│ ├── docker-compose.yml
│ └── scripts/
├── comfyui/
│ ├── docker-compose.yml
│ └── scripts/
└── llamacpp/
└── README.md
```
## Szybka weryfikacja (komendy)
```bash
# dysk i docker
mountpoint /data && df -h /data
docker info | grep "Docker Root Dir"
# vLLM
cd ~/cursor/ubuntu-bare-metal/stacks/vllm
docker compose --profile vllm ps
grep VLLM_MODEL .env
# LocalAI (port z .env użytkownika: 8070)
cd ~/cursor/ubuntu-bare-metal/stacks/localai
docker compose --profile localai ps
curl -s http://localhost:8070/readyz
# GPU
nvidia-smi
```
## Znane rozjazdy (docs vs runtime)
| Temat | Repo / docs | Faktycznie na serwerze |
|-------|-------------|------------------------|
| LocalAI port | 8080 w `.env.example`, tutorial 05 | **8070** w `.env` użytkownika |
| LOCALAI_API_KEY | brak w `docker-compose.yml` | ustawiony w `.env`, **może nie działać** w kontenerze |
| vLLM model | katalog + skrypty gotowe | model nie pobrany, stack nie startowany |
## Git / Gitea
- Repo zainicjowane lokalnie w `ubuntu-bare-metal/` (branch `main`)
- Root `.gitignore` — wyklucza `.env`, `.venv`, `upstream/`
- Push na Gitea: czeka na URL remote — [GITEA-PREP.md](GITEA-PREP.md)
## Server UI — wykres GPU Fan (ostatnie zmiany UI)
W `stacks/server-ui/static/index.html`: siatka osi, linijki kreskowe, odstępy etykiet, `aspect-ratio` SVG, wyśrodkowanie w karcie. Tutorial: [06-gpu-fan-control.md](../manual-tutorial/06-gpu-fan-control.md).