@norskvideo/ctl-product-template-schema 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -0
- package/index.js +15 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export declare const ProductTemplateAllocatedPortSchema: z.ZodObject<{
|
|
|
38
38
|
label: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
export type ProductTemplateAllocatedPort = z.infer<typeof ProductTemplateAllocatedPortSchema>;
|
|
41
|
+
export declare const ProductTemplateSideloadSchema: z.ZodObject<{
|
|
42
|
+
gpuInference: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type ProductTemplateSideload = z.infer<typeof ProductTemplateSideloadSchema>;
|
|
41
45
|
export declare const ProductTemplateManifestSchema: z.ZodObject<{
|
|
42
46
|
productTemplateSchemaVersion: z.ZodLiteral<1>;
|
|
43
47
|
productName: z.ZodString;
|
|
@@ -64,6 +68,9 @@ export declare const ProductTemplateManifestSchema: z.ZodObject<{
|
|
|
64
68
|
expose: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
65
69
|
}, z.core.$strip>>;
|
|
66
70
|
requiresWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
sideload: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
gpuInference: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
67
74
|
advanced: z.ZodOptional<z.ZodObject<{
|
|
68
75
|
networkMode: z.ZodOptional<z.ZodObject<{
|
|
69
76
|
default: z.ZodOptional<z.ZodEnum<{
|
|
@@ -173,6 +180,9 @@ export declare const ProductTemplateMaterialsSchema: z.ZodObject<{
|
|
|
173
180
|
expose: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
174
181
|
}, z.core.$strip>>;
|
|
175
182
|
requiresWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
+
sideload: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
gpuInference: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
176
186
|
advanced: z.ZodOptional<z.ZodObject<{
|
|
177
187
|
networkMode: z.ZodOptional<z.ZodObject<{
|
|
178
188
|
default: z.ZodOptional<z.ZodEnum<{
|
package/index.js
CHANGED
|
@@ -109,6 +109,18 @@ export const ProductTemplateAllocatedPortSchema = z
|
|
|
109
109
|
label: z.string().optional().meta({ description: "Human label, e.g. 'MoQ preview (WebTransport)'" }),
|
|
110
110
|
})
|
|
111
111
|
.meta({ id: "ProductTemplateAllocatedPort", outputId: "ProductTemplateAllocatedPort" });
|
|
112
|
+
// CUDA sideload bundle needs (docker/SIDELOAD.md). Only `gpuInference` is
|
|
113
|
+
// declared: `gpu-video` (NVENC/NVDEC) follows the GPU reservation automatically,
|
|
114
|
+
// so it needs no declaration. The runner mounts the matching bundle only when
|
|
115
|
+
// the image is slimmed AND the GPU is reserved; otherwise this is inert (a stock
|
|
116
|
+
// image needs no bundle; inference without a bundle falls back to CPU).
|
|
117
|
+
export const ProductTemplateSideloadSchema = z
|
|
118
|
+
.object({
|
|
119
|
+
gpuInference: z.boolean().optional().meta({
|
|
120
|
+
description: "Deployment uses GPU-accelerated inference (ONNX NR-IQA/detection/VAD, GPU whisper). When the GPU is reserved on the host the runner mounts the gpu-inference CUDA bundle; otherwise inference falls back to CPU. gpu-video (NVENC/NVDEC) follows the GPU reservation automatically and needs no declaration.",
|
|
121
|
+
}),
|
|
122
|
+
})
|
|
123
|
+
.meta({ id: "ProductTemplateSideload", outputId: "ProductTemplateSideload" });
|
|
112
124
|
export const ProductTemplateManifestSchema = z
|
|
113
125
|
.object({
|
|
114
126
|
productTemplateSchemaVersion: z.literal(1),
|
|
@@ -126,6 +138,9 @@ export const ProductTemplateManifestSchema = z
|
|
|
126
138
|
requiresWorkingDirectory: z.boolean().optional().meta({
|
|
127
139
|
description: "When true, the operator must choose a working directory at launch (a dev product template they own and keep), rather than getting the auto-assigned per-instance default. The runner's launch UI makes the working-directory field mandatory.",
|
|
128
140
|
}),
|
|
141
|
+
sideload: ProductTemplateSideloadSchema.optional().meta({
|
|
142
|
+
description: "CUDA sideload bundle needs. Only gpu-inference is declared (gpu-video follows the GPU reservation automatically). The runner mounts the matching bundle when the image is slimmed and the GPU is reserved.",
|
|
143
|
+
}),
|
|
129
144
|
advanced: ProductTemplateAdvancedSchema.optional().meta({
|
|
130
145
|
description: "Settings-backed runner knobs the operator may override per instance. Key presence opts the knob into the launch form; `default` pre-fills it (else the runner's daemon-wide default applies).",
|
|
131
146
|
}),
|