Repository navigation
feat(gateway): a card picker on the board and the /gui/ page - #282
Merged
Merged
Conversation
On a two-card node with gpu1 cordoned, GET /v1/berth/board must give each card its base URL and cordon, and each engine the cards its entry runs on, a PCI address and a missing gpu key included. /gui/state must carry the same cards per engine. Fails until the board and the rows carry them.
guiRow carries the cards an engine's entry runs on, from berthd's status, so GET /v1/berth/board and /gui/state both name them. Each board card gets its base URL on the gateway and its cordon. The /gui/ page shows each row's card as a chip when the rows span more than one card, so launching the copy of a model on gpu1 picks that card from a phone. One card, or berthd not answering, shows no chip. Fourth slice of v0.5, per-card gateway endpoints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth slice of v0.5: per-card gateway endpoints.
What changes for users
On a node with several cards, the gateway's
/gui/page (the phone switchboard) shows each engine's card next to its name. Since #278, a model can have one engine entry per card, so launchingqwen-gpu1instead ofqwen-gpu0is how you pick the card from a phone. On a one-card node the page looks exactly as before.GET /v1/berth/boardnow gives scripts and boards the same facts:cards, the cards its entry runs on;base, its own gateway URL (/cards/gpu1/v1);cordonedflag (feat: berth cordon and uncordon a card #281).The harbor's own SWITCH tab (board plan step 5) is still to come. This slice puts the card into the data that tab will read, and into the board phones use today.
How
guiRowgainscards, filled fromnode.CardsOf(status, e.GPU)inguiRows. The board embedsguiRow, so/gui/stateand the board get the field from one place.boardCardgainsbase(left out for a berthd too old to name its cards) andcordoned.index.jsfills a.gpuchip per row and shows it only when the rows span more than one card.Proof
TestBoardNamesEachEnginesCard(two cards, gpu1 cordoned): each card'sbaseandcordonedare checked, and so are each engine'scardson both the board and/gui/state, for a name, a PCI address and an entry with nogpu. It fails before the feature commit.GUIHandleron the test's two-card berthd, at phone (390x844) and desktop (1280x800) sizes. Chips read gpu0, gpu1 and gpu0, no row header overflows, and each chip is 44 px wide. The first run caught a bug: the chip's class collided with the page's.cardpanel and stretched across the row. The fix names it.gpu. On a one-card daemon, every chip stays hidden.go test ./..., the Windows build and vet, and golangci-lint (0 issues) all pass.