Skip to content

Commit d6bf4ba

Browse files
author
anderdc
committed
compute: release card shows the attest image and both docker run lines; capacity = attested cards
Claude-Session: https://claude.ai/code/session_01FJtQK6NCjUgYkGTopczEf4
1 parent c7a9cb0 commit d6bf4ba

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

src/api/mocks/servingMock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export const mockServingStatus = (): ServingStatus => {
143143
'9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08',
144144
modelFile: 'gpt-oss-20b-q8_0.gguf',
145145
image: 'entrius/sparkinfer:12954e6',
146+
attestImage: 'entrius/gt-attest:v1',
146147
},
147148
};
148149
};

src/api/models/Serving.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ export interface ServingRelease {
1313
runtimePin: string;
1414
modelSha256: string;
1515
modelFile: string;
16-
/** e.g. "entrius/sparkinfer:12954e6" */
16+
/** e.g. "entrius/sparkinfer:7498736@sha256:…" — the runtime container */
1717
image: string;
18+
/** e.g. "entrius/gt-attest:v1" — the attest container every box runs beside the runtime; null on older rounds */
19+
attestImage: string | null;
1820
}
1921

2022
export interface ServingStatus {
@@ -65,7 +67,7 @@ export interface ServingMiner {
6567
ttftMs: number | null;
6668
/** Validator-observed decode rate on served traffic, mean over the round (tok/s). */
6769
decodeTps: number | null;
68-
/** 1 when this round's hardware attestation passed, else 0. */
70+
/** GPUs that passed this round's hardware attestation (0 = not attested); each is a card-hour. */
6971
capacity: number;
7072
roundScore: number;
7173
/** Trailing 12-round mean of roundScore — what the miner is paid on. */

src/components/compute/ComputeReleaseCard.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,17 @@ const DOCKER_HUB_URL = 'https://hub.docker.com/u/entrius';
2121

2222
const MONO = '"JetBrains Mono", monospace';
2323

24-
/** The exact command miners run; kept in one place so docs can link here. */
24+
/** The exact commands miners run — the runtime and, beside it, the attest container that answers the validators'
25+
* hardware challenge on every GPU of the box. Kept in one place so docs can link here. */
2526
export const buildSparkinferRunCommand = (release: ServingRelease): string =>
26-
`docker run -d --name sparkinfer --gpus all -p 8080:8080 -v sparkmodels:/opt/sparkinfer/models -e MODEL_SHA256=${release.modelSha256} -e SPARKINFER_DETERMINISTIC=1 ${release.image}`;
27+
[
28+
`docker run -d --name sparkinfer --gpus all --restart unless-stopped -p 127.0.0.1:8080:8080 -v sparkmodels:/opt/sparkinfer/models -e MODEL_SHA256=${release.modelSha256} -e SPARKINFER_DETERMINISTIC=1 ${release.image}`,
29+
release.attestImage
30+
? `docker run -d --name gt-attest --gpus all --restart unless-stopped -p 127.0.0.1:8081:8081 ${release.attestImage}`
31+
: null,
32+
]
33+
.filter(Boolean)
34+
.join('\n');
2735

2836
const CopyButton: React.FC<{ text: string; label: string }> = ({
2937
text,
@@ -162,6 +170,11 @@ export const ComputeReleaseCard: React.FC<{ release: ServingRelease }> = ({
162170
<Field label="Model file" value={release.modelFile} />
163171
<Field label="Image" value={release.image} copyable />
164172
</Box>
173+
{release.attestImage && (
174+
<Box sx={{ mb: 2 }}>
175+
<Field label="Attest image" value={release.attestImage} copyable />
176+
</Box>
177+
)}
165178
<Box sx={{ mb: 2 }}>
166179
<Field label="Model SHA-256" value={release.modelSha256} copyable />
167180
</Box>
@@ -201,7 +214,7 @@ export const ComputeReleaseCard: React.FC<{ release: ServingRelease }> = ({
201214
>
202215
<code>{command}</code>
203216
</Box>
204-
<CopyButton text={command} label="docker command" />
217+
<CopyButton text={command} label="docker commands" />
205218
</Box>
206219

207220
<Stack direction="row" flexWrap="wrap" gap={2} sx={{ mt: 1.5 }}>

0 commit comments

Comments
 (0)