Deployments: serve a model with a runtime container
- deployments + deployment_logs tables; desired/actual state reconciled by the worker (create/start/stop/remove via the socket proxy, /health wait, log follower, stats, memory guard, adopt/remove containers on restart). - Pure command builder for llama-server and vllm serve (mmproj, MTP draft, KV cache types, dtype, KV cache size) with tests; file candidates per engine with tests. - New main menu entry Deployments: list, new/edit form (runtime -> model and files -> launch options, live command preview), detail page with stats, log, endpoint and a streaming chat smoke test. Not yet tested end-to-end against real containers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f7ae1fc8c
commit
8b74fa69db
32 files changed
+3824
-3
No files matched your search
@@ -0,0 +1,37 @@
|
||||
CREATE TABLE `deployment_logs` (
|
||||
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`deployment_id` text NOT NULL,
|
||||
`ts` integer NOT NULL,
|
||||
`stream` text NOT NULL,
|
||||
`line` text NOT NULL,
|
||||
FOREIGN KEY (`deployment_id`) REFERENCES `deployments`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `deployment_logs_idx` ON `deployment_logs` (`deployment_id`,`id`);--> statement-breakpoint
|
||||
CREATE TABLE `deployments` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`runtime_id` text NOT NULL,
|
||||
`model_id` text NOT NULL,
|
||||
`options` text NOT NULL,
|
||||
`cpus` real,
|
||||
`memory_mb` integer,
|
||||
`host_port` integer,
|
||||
`desired_state` text DEFAULT 'stopped' NOT NULL,
|
||||
`state` text DEFAULT 'stopped' NOT NULL,
|
||||
`delete_requested_at` integer,
|
||||
`container_id` text,
|
||||
`container_name` text,
|
||||
`command` text,
|
||||
`image_id` text,
|
||||
`started_at` integer,
|
||||
`ready_at` integer,
|
||||
`stopped_at` integer,
|
||||
`exit_code` integer,
|
||||
`error` text,
|
||||
`stats` text,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`runtime_id`) REFERENCES `runtimes`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`model_id`) REFERENCES `models`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
Reference in new issue
Block a user