NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
docs: add docker compose generator (#22956)
GuoQing Liu882b3a8ffd71
diff --git a/.gitignore b/.gitignoreindex c9db2929f8..7c97a23a0e 100644--- a/.gitignore+++ b/.gitignore@@ -22,3 +22,8 @@ core!/web/**/*.ts.idea/*.ipynb_checkpoints++# Auto-generated Docker Compose Generator config files+docs/src/components/DockerComposeGenerator/config/devices.ts+docs/src/components/DockerComposeGenerator/config/hardware.ts+docs/src/components/DockerComposeGenerator/config/ports.tsdiff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.mdindex 1ae975628e..485a735d81 100644--- a/docs/docs/frigate/installation.md+++ b/docs/docs/frigate/installation.md@@ -4,6 +4,9 @@ title: Installation---import ShmCalculator from '@site/src/components/ShmCalculator'+import DockerComposeGenerator from '@site/src/components/DockerComposeGenerator'+import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';Frigate is a Docker container that can be run on any Docker host including as a [Home Assistant App](https://www.home-assistant.io/apps/). Note that the Home Assistant App is **not** the same thing as the integration. The [integration](/integrations/home-assistant) is required to integrate Frigate into Home Assistant, whether you are running Frigate as a standalone Docker container or as a Home Assistant App.@@ -474,6 +477,16 @@ Finally, configure [hardware object detection](/configuration/object_detectors#aRunning through Docker with Docker Compose is the recommended install method.+<Tabs>+ <TabItem value="domestic" label="Docker Compose Generator" default>++Generate a Frigate Docker Compose configuration based on your hardware and requirements.++<DockerComposeGenerator/>+++ </TabItem>+ <TabItem value="original" label="Example Docker Compose File">```yamlservices:frigate:@@ -507,6 +520,10 @@ services:environment:FRIGATE_RTSP_PASSWORD: "password"```+ </TabItem>+</Tabs>++**Docker CLI**If you can't use Docker Compose, you can run the container with something similar to this:diff --git a/docs/package-lock.json b/docs/package-lock.jsonindex ed766c1ab7..222ae031a4 100644--- a/docs/package-lock.json+++ b/docs/package-lock.json@@ -14,9 +14,11 @@"@docusaurus/theme-mermaid": "^3.7.0","@inkeep/docusaurus": "^2.0.16","@mdx-js/react": "^3.1.0",+ "@types/js-yaml": "^4.0.9","clsx": "^2.1.1","docusaurus-plugin-openapi-docs": "^4.5.1","docusaurus-theme-openapi-docs": "^4.5.1",+ "js-yaml": "^4.1.1","prism-react-renderer": "^2.4.1","raw-loader": "^4.0.2","react": "^18.3.1",@@ -5747,6 +5749,11 @@"@types/istanbul-lib-report": "*"}},+ "node_modules/@types/js-yaml": {+ "version": "4.0.9",+ "resolved": "https://mirrors.tencent.com/npm/@types/js-yaml/-/js-yaml-4.0.9.tgz",+ "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg=="+ },"node_modules/@types/json-schema": {"version": "7.0.15","resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",@@ -12883,7 +12890,7 @@},"node_modules/js-yaml": {"version": "4.1.1",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",+ "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.1.tgz","integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==","license": "MIT","dependencies": {diff --git a/docs/package.json b/docs/package.jsonindex 0ff76c4739..e57d7a1540 100644--- a/docs/package.json+++ b/docs/package.json@@ -3,9 +3,10 @@"version": "0.0.0","private": true,"scripts": {+ "build:config": "node scripts/build-config.mjs","docusaurus": "docusaurus",- "start": "npm run regen-docs && docusaurus start --host 0.0.0.0",- "build": "npm run regen-docs && docusaurus build",+ "start": "npm run build:config && npm run regen-docs && docusaurus start --host 0.0.0.0",+ "build": "npm run build:config && npm run regen-docs && docusaurus build","swizzle": "docusaurus swizzle","deploy": "docusaurus deploy","clear": "docusaurus clear",@@ -23,9 +24,11 @@"@docusaurus/theme-mermaid": "^3.7.0","@inkeep/docusaurus": "^2.0.16","@mdx-js/react": "^3.1.0",+ "@types/js-yaml": "^4.0.9","clsx": "^2.1.1","docusaurus-plugin-openapi-docs": "^4.5.1","docusaurus-theme-openapi-docs": "^4.5.1",+ "js-yaml": "^4.1.1","prism-react-renderer": "^2.4.1","raw-loader": "^4.0.2","react": "^18.3.1",diff --git a/docs/scripts/build-config.mjs b/docs/scripts/build-config.mjsnew file mode 100644index 0000000000..78926bed5b--- /dev/null+++ b/docs/scripts/build-config.mjs@@ -0,0 +1,64 @@+#!/usr/bin/env node++/**+ * Build script: reads config.yaml and generates TypeScript files+ * for the Docker Compose Generator.+ *+ * Usage: node scripts/build-config.mjs+ */++import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";+import yaml from "js-yaml";++const __dirname = path.dirname(fileURLToPath(import.meta.url));+const CONFIG_DIR = path.resolve(__dirname, "../src/components/DockerComposeGenerator/config");+const YAML_PATH = path.join(CONFIG_DIR, "config.yaml");++// Read & parse YAML+const raw = fs.readFileSync(YAML_PATH, "utf8");+const config = yaml.load(raw);++if (!config.devices || !config.hardware || !config.ports) {+ console.error("config.yaml must contain 'devices', 'hardware', and 'ports' sections.");+ process.exit(1);+}++/**+ * Generate a .ts file from a section of the YAML config.+ */+function generateTsFile(sectionName, items, typeName, varName, mapVarName, yamlFilename) {+ const jsonItems = JSON.stringify(items, null, 2);+ // Indent JSON to fit inside the array literal+ const indented = jsonItems+ .split("\n")+ .map((line, i) => (i === 0 ? line : " " + line))+ .join("\n");++ const content = `/**+ * AUTO-GENERATED FILE — do not edit directly.+ * Source: ${yamlFilename}+ * To update, edit the YAML file and run: npm run build:config+ */++import type { ${typeName} } from "./types";++export const ${varName}: ${typeName}[] = ${indented};++/** Lookup map for quick access by ID */+export const ${mapVarName}: Map<string, ${typeName}> = new Map(${varName}.map((item) => [item.id, item]));+`;++ const outPath = path.join(CONFIG_DIR, `${sectionName}.ts`);+ fs.writeFileSync(outPath, content, "utf8");+ console.log(` ✓ Generated ${sectionName}.ts (${items.length} items)`);+}++console.log("Building config from config.yaml...");++generateTsFile("devices", config.devices, "DeviceConfig", "devices", "deviceMap", "config.yaml");+generateTsFile("hardware", config.hardware, "HardwareOption", "hardwareOptions", "hardwareMap", "config.yaml");+generateTsFile("ports", config.ports, "PortConfig", "ports", "portMap", "config.yaml");++console.log("Done!");diff --git a/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx b/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsxnew file mode 100644index 0000000000..b8a8a8fc85--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx@@ -0,0 +1,108 @@+import React from "react";+import Admonition from "@theme/Admonition";+import DeviceSelector from "./components/DeviceSelector";+import HardwareOptions from "./components/HardwareOptions";+import PortConfigSection from "./components/PortConfig";+import StoragePaths from "./components/StoragePaths";+import NvidiaGpuConfig from "./components/NvidiaGpuConfig";+import OtherOptions from "./components/OtherOptions";+import GeneratedOutput from "./components/GeneratedOutput";+import { useConfigGenerator } from "./hooks/useConfigGenerator";+import styles from "./styles.module.css";++/**+ * Simple markdown-link-to-React renderer for help text.+ * Only supports [text](url) syntax — no nested brackets.+ */+function renderHelpText(text: string): React.ReactNode {+ const parts = text.split(/(\[[^\]]+\]\([^)]+\))/g);+ return parts.map((part, i) => {+ const match = part.match(/^\[([^\]]+)\]\(([^)]+)\)$/);+ if (match) {+ return (+ <a key={i} href={match[2]}>+ {match[1]}+ </a>+ );+ }+ return <React.Fragment key={i}>{part}</React.Fragment>;+ });+}++export default function DockerComposeGenerator() {+ const {+ deviceId, device, hardwareEnabled,+ portEnabled,+ nvidiaGpuCount, nvidiaGpuDeviceId,+ configPath, mediaPath, rtspPassword, timezone, shmSize,+ shmSizeError, gpuDeviceIdError, configPathError, mediaPathError,+ hasAnyHardware, generatedYaml,+ selectDevice, toggleHardware, togglePort,+ handleShmSizeChange, handleConfigPathChange, handleMediaPathChange,+ handleNvidiaGpuCountChange, handleNvidiaGpuDeviceIdChange,+ setRtspPassword, setTimezone, isHardwareDisabled,+ } = useConfigGenerator();++ return (+ <div className={styles.generator}>+ <div className={styles.card}>+ <DeviceSelector selectedId={deviceId} onSelect={selectDevice} />++ {device.helpText && (+ <Admonition type={device.helpType || "info"}>+ {renderHelpText(device.helpText)}+ </Admonition>+ )}++ {device.needsNvidiaConfig && (+ <NvidiaGpuConfig+ gpuCount={nvidiaGpuCount}+ gpuDeviceId={nvidiaGpuDeviceId}+ gpuDeviceIdError={gpuDeviceIdError}+ onGpuCountChange={handleNvidiaGpuCountChange}+ onGpuDeviceIdChange={handleNvidiaGpuDeviceIdChange}+ />+ )}++ <HardwareOptions+ deviceId={deviceId}+ hardwareEnabled={hardwareEnabled}+ onToggle={toggleHardware}+ isDisabled={isHardwareDisabled}+ />++ <StoragePaths+ configPath={configPath}+ mediaPath={mediaPath}+ configPathError={configPathError}+ mediaPathError={mediaPathError}+ onConfigPathChange={handleConfigPathChange}+ onMediaPathChange={handleMediaPathChange}+ />++ <PortConfigSection+ portEnabled={portEnabled}+ onTogglePort={togglePort}+ />++ <OtherOptions+ rtspPassword={rtspPassword}+ timezone={timezone}+ shmSize={shmSize}+ shmSizeError={shmSizeError}+ onRtspPasswordChange={setRtspPassword}+ onTimezoneChange={setTimezone}+ onShmSizeChange={handleShmSizeChange}+ />++ <GeneratedOutput+ yaml={generatedYaml}+ configPath={configPath}+ mediaPath={mediaPath}+ hasAnyHardware={hasAnyHardware}+ deviceId={deviceId}+ />+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/DeviceSelector.tsx b/docs/src/components/DockerComposeGenerator/components/DeviceSelector.tsxnew file mode 100644index 0000000000..ddad160502--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/DeviceSelector.tsx@@ -0,0 +1,147 @@+import React from "react";+import { useColorMode } from "@docusaurus/theme-common";+import { devices } from "../config";+import type { DeviceConfig } from "../config";+import styles from "../styles.module.css";++interface Props {+ selectedId: string;+ onSelect: (id: string) => void;+}++/**+ * Determine the icon type from the icon string:+ * - Starts with "<svg" → inline SVG+ * - Starts with "/" or "http" → image URL/path+ * - Otherwise → emoji text+ */+function getIconType(icon: string): "svg" | "image" | "emoji" {+ const trimmed = icon.trim();+ if (trimmed.startsWith("<svg")) return "svg";+ if (trimmed.startsWith("/") || trimmed.startsWith("http://") || trimmed.startsWith("https://")) return "image";+ return "emoji";+}++/**+ * Check if the style object contains background-* properties,+ * indicating the image should be rendered as a CSS background-image+ * rather than an <img> tag.+ */+function hasBackgroundProps(style: React.CSSProperties | undefined): boolean {+ if (!style) return false;+ return Object.keys(style).some((key) => {+ const k = key.toLowerCase().replace(/-/g, "");+ return k === "backgroundsize" || k === "backgroundposition" || k === "backgroundrepeat" || k === "backgroundimage";+ });+}++/**+ * Convert a style object to CSS custom properties (e.g. { width: "24px" } → { "--svg-width": "24px" })+ * so they can be consumed by CSS rules targeting child elements like <svg>.+ */+function toCssVars(style: React.CSSProperties | undefined, prefix: string): React.CSSProperties {+ if (!style) return {};+ const vars: Record<string, string> = {};+ for (const [key, value] of Object.entries(style)) {+ const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();+ vars[`--${prefix}-${cssKey}`] = value;+ }+ return vars as React.CSSProperties;+}++function DeviceIcon({ device }: { device: DeviceConfig }) {+ const { isDarkTheme } = useColorMode();+ const iconStr = isDarkTheme && device.iconDark ? device.iconDark : device.icon;+ const iconStyle = (isDarkTheme && device.iconDarkStyle+ ? device.iconDarkStyle+ : device.iconStyle) as React.CSSProperties | undefined;+ const svgStyle = (isDarkTheme && device.svgDarkStyle+ ? device.svgDarkStyle+ : device.svgStyle) as React.CSSProperties | undefined;++ const iconType = getIconType(iconStr);++ if (iconType === "svg") {+ return (+ <div+ className={styles.deviceIconSvg}+ style={{ ...iconStyle, ...toCssVars(svgStyle, "svg") }}+ dangerouslySetInnerHTML={{ __html: iconStr }}+ />+ );+ }++ if (iconType === "image") {+ // When iconStyle contains background-* properties, render as background-image+ // on the container div instead of an <img> tag, enabling background-size/position control.+ if (hasBackgroundProps(iconStyle)) {+ return (+ <div+ className={styles.deviceIconImage}+ style={{+ backgroundImage: `url(${iconStr})`,+ backgroundRepeat: "no-repeat",+ backgroundPosition: "center",+ backgroundSize: "contain",+ ...iconStyle,+ }}+ />+ );+ }+ return (+ <div className={styles.deviceIconImage}>+ <img src={iconStr} alt={device.name} style={iconStyle} />+ </div>+ );+ }++ return (+ <div className={styles.deviceIcon} style={iconStyle}>+ {iconStr}+ </div>+ );+}++function DeviceCard({+ device,+ active,+ onClick,+}: {+ device: DeviceConfig;+ active: boolean;+ onClick: () => void;+}) {+ return (+ <div+ className={`${styles.deviceCard} ${active ? styles.deviceCardActive : ""}`}+ onClick={onClick}+ role="button"+ tabIndex={0}+ onKeyDown={(e) => {+ if (e.key === "Enter" || e.key === " ") onClick();+ }}+ >+ <DeviceIcon device={device} />+ <div className={styles.deviceName}>{device.name}</div>+ <div className={styles.deviceDesc}>{device.description}</div>+ </div>+ );+}++export default function DeviceSelector({ selectedId, onSelect }: Props) {+ return (+ <div className={styles.formSection}>+ <h4>Device Type</h4>+ <div className={styles.deviceGrid}>+ {devices.map((d) => (+ <DeviceCard+ key={d.id}+ device={d}+ active={selectedId === d.id}+ onClick={() => onSelect(d.id)}+ />+ ))}+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/GeneratedOutput.tsx b/docs/src/components/DockerComposeGenerator/components/GeneratedOutput.tsxnew file mode 100644index 0000000000..f170637aa0--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/GeneratedOutput.tsx@@ -0,0 +1,60 @@+import React, { useState, useCallback } from "react";+import CodeBlock from "@theme/CodeBlock";+import Admonition from "@theme/Admonition";+import styles from "../styles.module.css";++interface Props {+ yaml: string;+ configPath: string;+ mediaPath: string;+ hasAnyHardware: boolean;+ deviceId: string;+}++export default function GeneratedOutput({+ yaml,+ configPath,+ mediaPath,+ hasAnyHardware,+ deviceId,+}: Props) {+ const [copied, setCopied] = useState(false);++ const handleCopy = useCallback(() => {+ navigator.clipboard.writeText(yaml).then(() => {+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ });+ }, [yaml]);++ return (+ <div className={styles.resultSection}>+ <div className={styles.resultHeader}>+ <h4>Generated Configuration</h4>+ <button className="button button--primary button--sm" onClick={handleCopy}>+ {copied ? "Copied!" : "Copy"}+ </button>+ </div>++ {!configPath && (+ <Admonition type="tip">+ <p>You haven't specified a config file directory. You may want to modify the default path.</p>+ </Admonition>+ )}+ {!mediaPath && (+ <Admonition type="tip">+ <p>You haven't specified a recording storage directory. You may want to modify the default path.</p>+ </Admonition>+ )}+ {deviceId === "stable" && !hasAnyHardware && (+ <Admonition type="warning">+ <p>You haven't selected any hardware acceleration. Please check if you have supported hardware available.</p>+ </Admonition>+ )}++ <CodeBlock language="yaml" title="docker-compose.yml">+ {yaml}+ </CodeBlock>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/HardwareOptions.tsx b/docs/src/components/DockerComposeGenerator/components/HardwareOptions.tsxnew file mode 100644index 0000000000..9c261ed419--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/HardwareOptions.tsx@@ -0,0 +1,62 @@+import React from "react";+import { hardwareOptions } from "../config";+import type { HardwareOption } from "../config";+import styles from "../styles.module.css";++interface Props {+ deviceId: string;+ hardwareEnabled: Record<string, boolean>;+ onToggle: (hwId: string) => void;+ isDisabled: (hwId: string) => boolean;+}++function renderDescription(text: string): React.ReactNode {+ const parts = text.split(/(\[[^\]]+\]\([^)]+\))/g);+ return parts.map((part, i) => {+ const match = part.match(/^\[([^\]]+)\]\(([^)]+)\)$/);+ if (match) {+ return <a key={i} href={match[2]}>{match[1]}</a>;+ }+ return <React.Fragment key={i}>{part}</React.Fragment>;+ });+}++function HardwareCheckbox({+ hw, disabled, checked, onToggle,+}: {+ hw: HardwareOption; disabled: boolean; checked: boolean; onToggle: () => void;+}) {+ return (+ <div className={styles.hardwareItem}>+ <label className={`${styles.checkboxLabel} ${disabled ? styles.checkboxDisabled : ""}`}>+ <input type="checkbox" checked={checked} onChange={onToggle} disabled={disabled} />+ <span>{hw.label}</span>+ </label>+ {checked && hw.description && (+ <div className={styles.hardwareDescription}>{renderDescription(hw.description)}</div>+ )}+ </div>+ );+}++export default function HardwareOptions({ deviceId, hardwareEnabled, onToggle, isDisabled }: Props) {+ return (+ <div className={styles.formSection}>+ <h4>Generic Hardware Devices</h4>+ {deviceId !== "stable" && (+ <p className={styles.helpText}>+ Some options have been auto-configured based on your device type.+ </p>+ )}+ <div className={styles.checkboxGrid}>+ {hardwareOptions.map((hw) => {+ const disabled = isDisabled(hw.id);+ const checked = disabled ? false : !!hardwareEnabled[hw.id];+ return (+ <HardwareCheckbox key={hw.id} hw={hw} disabled={disabled} checked={checked} onToggle={() => onToggle(hw.id)} />+ );+ })}+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx b/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsxnew file mode 100644index 0000000000..9c9be5e6a9--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx@@ -0,0 +1,64 @@+import React from "react";+import styles from "../styles.module.css";++interface Props {+ gpuCount: string;+ gpuDeviceId: string;+ gpuDeviceIdError: boolean;+ onGpuCountChange: (value: string) => void;+ onGpuDeviceIdChange: (value: string) => void;+}++export default function NvidiaGpuConfig({+ gpuCount,+ gpuDeviceId,+ gpuDeviceIdError,+ onGpuCountChange,+ onGpuDeviceIdChange,+}: Props) {+ const showDeviceId = gpuCount !== "";++ return (+ <div className={styles.nvidiaConfig}>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-gpu-count" className={styles.label}>+ GPU count:+ </label>+ <input+ id="dcg-gpu-count"+ type="text"+ inputMode="numeric"+ pattern="[0-9]*"+ className={styles.input}+ value={gpuCount}+ placeholder="all"+ onChange={(e) => onGpuCountChange(e.target.value.replace(/\D/g, ""))}+ />+ </div>+ {showDeviceId && (+ <div className={styles.formGroup}>+ <label htmlFor="dcg-gpu-device-id" className={styles.label}>+ GPU device IDs (required, comma-separated):+ </label>+ <input+ id="dcg-gpu-device-id"+ type="text"+ className={`${styles.input} ${gpuDeviceIdError ? styles.inputError : ""}`}+ value={gpuDeviceId}+ placeholder="0"+ onChange={(e) => onGpuDeviceIdChange(e.target.value)}+ />+ {gpuDeviceIdError ? (+ <p className={styles.helpText}>+ ⚠️ GPU device IDs are required when GPU count is a number+ </p>+ ) : (+ <p className={styles.helpText}>+ Single GPU: 0 | Multiple GPUs: 0,1,2+ </p>+ )}+ </div>+ )}+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/OtherOptions.tsx b/docs/src/components/DockerComposeGenerator/components/OtherOptions.tsxnew file mode 100644index 0000000000..8d1efef0fc--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/OtherOptions.tsx@@ -0,0 +1,122 @@+import React, { useMemo } from "react";+import CodeInline from "@theme/CodeInline";+import styles from "../styles.module.css";++const AUTO_TIMEZONE_VALUE = "__auto__";++function getTimezoneList(): string[] {+ if (typeof Intl !== "undefined") {+ const intl = Intl as typeof Intl & {+ supportedValuesOf?: (key: string) => string[];+ };+ const supported = intl.supportedValuesOf?.("timeZone");+ if (supported && supported.length > 0) {+ return [...supported].sort();+ }+ }++ const fallback = Intl.DateTimeFormat().resolvedOptions().timeZone;+ return fallback ? [fallback] : ["UTC"];+}++interface Props {+ rtspPassword: string;+ timezone: string;+ shmSize: string;+ shmSizeError: boolean;+ onRtspPasswordChange: (value: string) => void;+ onTimezoneChange: (value: string) => void;+ onShmSizeChange: (value: string) => void;+}++export default function OtherOptions({+ rtspPassword,+ timezone,+ shmSize,+ shmSizeError,+ onRtspPasswordChange,+ onTimezoneChange,+ onShmSizeChange,+}: Props) {+ const timezones = useMemo(() => getTimezoneList(), []);+ const systemTimezone =+ Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC";+ const selectedValue = timezone || AUTO_TIMEZONE_VALUE;++ return (+ <div className={styles.formSection}>+ <h4>Other Options</h4>+ <div className={styles.formGrid}>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-timezone" className={styles.label}>+ Timezone:+ </label>+ <select+ id="dcg-timezone"+ className={`${styles.input} ${styles.select}`}+ value={selectedValue}+ onChange={(e) =>+ onTimezoneChange(+ e.target.value === AUTO_TIMEZONE_VALUE ? "" : e.target.value+ )+ }+ >+ <option value={AUTO_TIMEZONE_VALUE}>+ Use browser timezone ({systemTimezone})+ </option>+ {timezones.map((tz) => (+ <option key={tz} value={tz}>+ {tz}+ </option>+ ))}+ </select>+ </div>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-shm-size" className={styles.label}>+ Shared memory (SHM):+ </label>+ <input+ id="dcg-shm-size"+ type="text"+ className={`${styles.input} ${shmSizeError ? styles.inputError : ""}`}+ value={shmSize}+ placeholder="512mb"+ onChange={(e) => onShmSizeChange(e.target.value)}+ />+ {shmSizeError ? (+ <p className={styles.helpText}>+ ⚠️ Invalid format. Use a number followed by a unit (e.g. 512mb, 1gb)+ </p>+ ) : (+ <p className={styles.helpText}>+ See{" "}+ <a href="/frigate/installation#calculating-required-shm-size">+ calculating required SHM size+ </a>{" "}+ for the correct value.+ </p>+ )}+ </div>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-rtsp-password" className={styles.label}>+ RTSP password:+ </label>+ <input+ id="dcg-rtsp-password"+ type="text"+ className={styles.input}+ value={rtspPassword}+ placeholder="password"+ onChange={(e) => onRtspPasswordChange(e.target.value)}+ />+ <p className={styles.helpText}>+ Optional. You can specify{" "}+ <CodeInline>{"{FRIGATE_RTSP_PASSWORD}"}</CodeInline>{" "}+ in the config file to reference camera stream passwords. This is NOT+ the Frigate login password.+ </p>+ </div>+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/PortConfig.tsx b/docs/src/components/DockerComposeGenerator/components/PortConfig.tsxnew file mode 100644index 0000000000..c4e5acf713--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/PortConfig.tsx@@ -0,0 +1,71 @@+import React from "react";+import Admonition from "@theme/Admonition";+import { ports } from "../config";+import styles from "../styles.module.css";++interface Props {+ portEnabled: Record<string, boolean>;+ onTogglePort: (portId: string) => void;+}++function PortItem({+ port,+ enabled,+ onToggle,+}: {+ port: typeof ports[number];+ enabled: boolean;+ onToggle: () => void;+}) {+ const showWarning = port.warningContent && (+ port.warningWhen === "checked" ? enabled :+ port.warningWhen === "unchecked" ? !enabled : enabled+ );++ return (+ <div className={styles.hardwareItem}>+ <label className={`${styles.checkboxLabel} ${port.locked ? styles.checkboxDisabled : ""}`}>+ <input+ type="checkbox"+ checked={enabled}+ onChange={onToggle}+ disabled={port.locked}+ />+ <span>+ {port.locked && "🔒 "}+ Port {port.host}+ {port.protocol !== "tcp" && `/${port.protocol}`}+ </span>+ </label>+ {port.description && (+ <div className={styles.hardwareDescription}>{port.description}</div>+ )}+ {showWarning && (+ <Admonition type={port.warningType || "warning"}>+ {port.warningContent}+ </Admonition>+ )}+ </div>+ );+}++export default function PortConfigSection({+ portEnabled,+ onTogglePort,+}: Props) {+ return (+ <div className={styles.formSection}>+ <h4>Port Configuration</h4>+ <div className={styles.checkboxGrid}>+ {ports.map((port) => (+ <PortItem+ key={port.id}+ port={port}+ enabled={!!portEnabled[port.id]}+ onToggle={() => onTogglePort(port.id)}+ />+ ))}+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/components/StoragePaths.tsx b/docs/src/components/DockerComposeGenerator/components/StoragePaths.tsxnew file mode 100644index 0000000000..1e20189cea--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/components/StoragePaths.tsx@@ -0,0 +1,66 @@+import React from "react";+import styles from "../styles.module.css";++interface Props {+ configPath: string;+ mediaPath: string;+ configPathError: boolean;+ mediaPathError: boolean;+ onConfigPathChange: (value: string) => void;+ onMediaPathChange: (value: string) => void;+}++export default function StoragePaths({+ configPath,+ mediaPath,+ configPathError,+ mediaPathError,+ onConfigPathChange,+ onMediaPathChange,+}: Props) {+ return (+ <div className={styles.formSection}>+ <h4>Storage Paths</h4>+ <div className={styles.formGrid}>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-config-path" className={styles.label}>+ Config / DB / model cache directory (on your host):+ </label>+ <input+ id="dcg-config-path"+ type="text"+ className={`${styles.input} ${configPathError ? styles.inputError : ""}`}+ value={configPath}+ placeholder="/path/to/your/config"+ onChange={(e) => onConfigPathChange(e.target.value)}+ />+ {configPathError && (+ <p className={styles.helpText}>+ ⚠️ Path contains invalid characters. Only letters, numbers,+ underscores, hyphens, slashes, and dots are allowed.+ </p>+ )}+ </div>+ <div className={styles.formGroup}>+ <label htmlFor="dcg-media-path" className={styles.label}>+ Recording storage directory (on your host):+ </label>+ <input+ id="dcg-media-path"+ type="text"+ className={`${styles.input} ${mediaPathError ? styles.inputError : ""}`}+ value={mediaPath}+ placeholder="/path/to/your/storage"+ onChange={(e) => onMediaPathChange(e.target.value)}+ />+ {mediaPathError && (+ <p className={styles.helpText}>+ ⚠️ Path contains invalid characters. Only letters, numbers,+ underscores, hyphens, slashes, and dots are allowed.+ </p>+ )}+ </div>+ </div>+ </div>+ );+}diff --git a/docs/src/components/DockerComposeGenerator/config/config.yaml b/docs/src/components/DockerComposeGenerator/config/config.yamlnew file mode 100644index 0000000000..747d3112b0--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/config/config.yaml@@ -0,0 +1,297 @@+# Unified configuration for Docker Compose Generator+# This file defines all devices, hardware options, and ports for Frigate Docker Compose generation++devices:+ - id: "stable"+ name: "Standard x86_64"+ description: "Generic PC / server"+ icon: "💻"+ imageTag: "stable"+ autoHardware: []++ - id: "intel"+ name: "Intel Device"+ description: "Intel GPU / NPU"+ icon: '<svg xmlns="http://www.w3.org/2000/svg"width="41" height="25" viewBox="0 0 50 12" fill="none" "viewBox="0 0 51 20"fill="none"><g clip-path="url(#clip0_5432_16259)"><path d="M4.2299 0.667969H0.605469V4.27284H4.2299V0.667969Z"fill="#00C7FD"></path><path d="M4.13917 19.4491V6.4536H0.695312V19.4363H4.13917V19.4491ZM26.9434 19.5774V16.3959C26.4404 16.3959 26.0147 16.3702 25.7052 16.3189C25.344 16.2676 25.0732 16.1393 24.8926 15.9597C24.712 15.7801 24.5959 15.5235 24.5314 15.1771C24.4798 14.8564 24.454 14.4331 24.454 13.9199V9.39138H26.9434V6.4536H24.454V1.39908H21.0102V13.9584C21.0102 15.0232 21.1005 15.9212 21.2811 16.6396C21.4616 17.3452 21.7712 17.9225 22.1968 18.3587C22.6225 18.7948 23.19 19.1027 23.8736 19.2952C24.5701 19.4876 25.4472 19.5774 26.492 19.5774H26.9434ZM46.6521 19.4491V0.398438H43.2082V19.4491H46.6521ZM17.6953 7.73647C16.7408 6.71018 15.3994 6.19703 13.6968 6.19703C12.8713 6.19703 12.1103 6.3638 11.4396 6.69735C10.756 7.03089 10.1885 7.49273 9.72414 8.08285L9.54357 8.3266V8.10851V6.4536H6.15131V19.4363H9.56936V12.5216V12.9963C9.56936 12.9193 9.56936 12.8423 9.56936 12.7653C9.60806 11.5466 9.90472 10.6486 10.4722 10.0713C11.0785 9.45553 11.8137 9.14764 12.6521 9.14764C13.6452 9.14764 14.4062 9.45553 14.9093 10.0456C15.3994 10.6358 15.6574 11.4696 15.6574 12.5344V12.5729V19.4363H19.127V12.0726C19.1399 10.2252 18.6498 8.76277 17.6953 7.73647ZM41.4282 12.9321C41.4282 11.9956 41.2606 11.1233 40.9381 10.3022C40.6028 9.49401 40.1384 8.7756 39.558 8.15982C38.9647 7.54404 38.2553 7.06938 37.4298 6.723C36.6043 6.37663 35.6885 6.20986 34.6953 6.20986C33.7537 6.20986 32.8638 6.38946 32.0383 6.73583C31.2128 7.09504 30.4905 7.5697 29.8842 8.17265C29.278 8.7756 28.7879 9.49401 28.4396 10.3151C28.0785 11.1361 27.9108 12.0213 27.9108 12.9578C27.9108 13.8943 28.0785 14.7795 28.4138 15.6005C28.7492 16.4215 29.2264 17.1399 29.8197 17.7429C30.4131 18.3458 31.1483 18.8333 31.9996 19.1797C32.8509 19.5389 33.7924 19.7185 34.7985 19.7185C37.7135 19.7185 39.5193 18.3972 40.6027 17.1656L38.1263 15.2926C37.6103 15.9084 36.3721 16.7422 34.8243 16.7422C33.8569 16.7422 33.0572 16.5242 32.451 16.0752C31.8448 15.639 31.432 15.0232 31.2128 14.2663L31.1741 14.1508H41.4282V12.9321ZM31.1999 11.739C31.1999 10.7897 32.2962 9.13481 34.6566 9.12198C37.017 9.12198 38.1263 10.7769 38.1263 11.7262L31.1999 11.739ZM50.5732 17.807C50.5087 17.6531 50.4184 17.5248 50.3023 17.4093C50.1862 17.2939 50.0572 17.2041 49.9024 17.1399C49.7477 17.0758 49.58 17.0373 49.4123 17.0373C49.2317 17.0373 49.077 17.0758 48.9222 17.1399C48.7674 17.2041 48.6384 17.2939 48.5223 17.4093C48.4062 17.5248 48.316 17.6531 48.2515 17.807C48.187 17.961 48.1483 18.1278 48.1483 18.2945C48.1483 18.4741 48.187 18.6281 48.2515 18.782C48.316 18.936 48.4062 19.0642 48.5223 19.1797C48.6384 19.2952 48.7674 19.385 48.9222 19.4491C49.077 19.5133 49.2446 19.5517 49.4123 19.5517C49.5929 19.5517 49.7477 19.5133 49.9024 19.4491C50.0572 19.385 50.1862 19.2952 50.3023 19.1797C50.4184 19.0642 50.5087 18.936 50.5732 18.782C50.6377 18.6281 50.6763 18.4613 50.6763 18.2945C50.6763 18.1278 50.6377 17.961 50.5732 17.807ZM50.3668 18.705C50.3152 18.8333 50.2378 18.9488 50.1475 19.0386C50.0572 19.1284 49.9411 19.2054 49.8122 19.2567C49.6832 19.308 49.5542 19.3337 49.3994 19.3337C49.2575 19.3337 49.1157 19.308 48.9867 19.2567C48.8577 19.2054 48.7416 19.1284 48.6513 19.0386C48.561 18.9488 48.4836 18.8333 48.432 18.705C48.3804 18.5768 48.3546 18.4485 48.3546 18.2945C48.3546 18.1534 48.3804 18.0123 48.432 17.884C48.4836 17.7557 48.561 17.6403 48.6513 17.5505C48.7416 17.4607 48.8577 17.3837 48.9867 17.3324C49.1157 17.2811 49.2446 17.2554 49.3994 17.2554C49.5413 17.2554 49.6832 17.2811 49.8122 17.3324C49.9411 17.3837 50.0572 17.4607 50.1475 17.5505C50.2378 17.6403 50.3152 17.7557 50.3668 17.884C50.4184 18.0123 50.4442 18.1406 50.4442 18.2945C50.4442 18.4485 50.4184 18.5768 50.3668 18.705ZM49.6445 18.41C49.7477 18.3972 49.8251 18.3587 49.8895 18.2945C49.954 18.2304 49.9927 18.1406 49.9927 18.0123C49.9927 17.8712 49.954 17.7685 49.8638 17.6916C49.7864 17.6146 49.6445 17.5761 49.4768 17.5761H48.9093V19.0258H49.1801V18.4356H49.3736L49.7348 19.0258H50.0185L49.6445 18.41ZM49.5026 18.1919C49.4639 18.1919 49.4252 18.1919 49.3736 18.1919H49.1801V17.7814H49.3736C49.4123 17.7814 49.451 17.7814 49.5026 17.7814C49.5413 17.7814 49.58 17.7942 49.6187 17.807C49.6574 17.8199 49.6832 17.8455 49.6961 17.8712C49.7219 17.8968 49.7219 17.9353 49.7219 17.9866C49.7219 18.0379 49.709 18.0764 49.6961 18.1021C49.6703 18.1278 49.6445 18.1534 49.6187 18.1662C49.58 18.1791 49.5413 18.1919 49.5026 18.1919Z"fill="currentColor"></path></g><defs><clipPath id="clip0_5432_16259"><rect width="51"height="20"fill="white"></rect></clipPath></defs></svg>'+ imageTag: "stable"+ autoHardware:+ - "gpu"+ - "intelNpu"+ helpText: "Intel Device automatically configures /dev/dri and /dev/accel device mappings."+ helpType: "info"++ - id: "stable-tensorrt"+ name: "NVIDIA GPU"+ description: "NVIDIA acceleration"+ icon: '<svg viewBox="0 0 32 33" xmlns="http://www.w3.org/2000/svg"><path d="M11.6925 17.7697V15.8762C11.8738 15.8633 12.0563 15.8528 12.2422 15.847C17.3372 15.6837 20.68 20.2978 20.68 20.2978C20.68 20.2978 17.0699 25.3962 13.1992 25.3962C12.6415 25.3962 12.1423 25.3052 11.6925 25.1511V19.4077C13.6766 19.6515 14.0748 20.5417 15.2671 22.5623L17.919 20.2885C17.919 20.2885 15.9831 17.7067 12.7195 17.7067C12.3649 17.7067 12.0253 17.7323 11.6913 17.7685L11.6925 17.7697ZM11.6913 11.5128V14.342C11.8738 14.3268 12.0574 14.3152 12.241 14.3082C19.3259 14.0655 23.9425 20.2162 23.9425 20.2162C23.9425 20.2162 18.6408 26.7705 13.1166 26.7705C12.6105 26.7705 12.1366 26.7227 11.6913 26.6433V28.3922C12.0723 28.4412 12.4671 28.4703 12.8779 28.4703C18.0177 28.4703 21.7358 25.8021 25.3356 22.6428C25.9323 23.1281 28.3754 24.31 28.8781 24.828C25.4549 27.7412 17.4795 30.0885 12.9571 30.0885C12.521 30.0885 12.1022 30.0617 11.6913 30.022V32.479H31.2282V11.514H11.6925L11.6913 11.5128ZM11.6913 25.15V26.6433C6.93708 25.7812 5.6174 20.7575 5.6174 20.7575C5.6174 20.7575 7.89986 18.1862 11.6913 17.7697V19.4077C11.6913 19.4077 11.6867 19.4077 11.6845 19.4077C9.69462 19.165 8.14085 21.055 8.14085 21.055C8.14085 21.055 9.01183 24.2365 11.6925 25.1523L11.6913 25.15ZM3.24888 20.5417C3.24888 20.5417 6.06609 16.3148 11.6925 15.8773V14.3443C5.46134 14.853 0.0644531 20.2185 0.0644531 20.2185C0.0644531 20.2185 3.12036 29.2018 11.6925 30.0243V28.3945C5.40167 27.5895 3.24888 20.5417 3.24888 20.5417Z" fill="#76B900"></path></svg>'+ svgStyle:+ width: 50px+ height: 50px+ iconStyle:+ padding-bottom: 15px+ imageTag: "stable-tensorrt"+ autoHardware: []+ helpText: "Requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker) to be installed. GPU deploy resources are configured automatically."+ helpType: "warning"+ needsNvidiaConfig: true++ - id: "stable-tensorrt-jp6"+ name: "NVIDIA Jetson"+ description: "Jetson development board"+ icon: '<svg viewBox="0 0 32 33" xmlns="http://www.w3.org/2000/svg"><path d="M11.6925 17.7697V15.8762C11.8738 15.8633 12.0563 15.8528 12.2422 15.847C17.3372 15.6837 20.68 20.2978 20.68 20.2978C20.68 20.2978 17.0699 25.3962 13.1992 25.3962C12.6415 25.3962 12.1423 25.3052 11.6925 25.1511V19.4077C13.6766 19.6515 14.0748 20.5417 15.2671 22.5623L17.919 20.2885C17.919 20.2885 15.9831 17.7067 12.7195 17.7067C12.3649 17.7067 12.0253 17.7323 11.6913 17.7685L11.6925 17.7697ZM11.6913 11.5128V14.342C11.8738 14.3268 12.0574 14.3152 12.241 14.3082C19.3259 14.0655 23.9425 20.2162 23.9425 20.2162C23.9425 20.2162 18.6408 26.7705 13.1166 26.7705C12.6105 26.7705 12.1366 26.7227 11.6913 26.6433V28.3922C12.0723 28.4412 12.4671 28.4703 12.8779 28.4703C18.0177 28.4703 21.7358 25.8021 25.3356 22.6428C25.9323 23.1281 28.3754 24.31 28.8781 24.828C25.4549 27.7412 17.4795 30.0885 12.9571 30.0885C12.521 30.0885 12.1022 30.0617 11.6913 30.022V32.479H31.2282V11.514H11.6925L11.6913 11.5128ZM11.6913 25.15V26.6433C6.93708 25.7812 5.6174 20.7575 5.6174 20.7575C5.6174 20.7575 7.89986 18.1862 11.6913 17.7697V19.4077C11.6913 19.4077 11.6867 19.4077 11.6845 19.4077C9.69462 19.165 8.14085 21.055 8.14085 21.055C8.14085 21.055 9.01183 24.2365 11.6925 25.1523L11.6913 25.15ZM3.24888 20.5417C3.24888 20.5417 6.06609 16.3148 11.6925 15.8773V14.3443C5.46134 14.853 0.0644531 20.2185 0.0644531 20.2185C0.0644531 20.2185 3.12036 29.2018 11.6925 30.0243V28.3945C5.40167 27.5895 3.24888 20.5417 3.24888 20.5417Z" fill="#76B900"></path></svg>'+ svgStyle:+ width: 50px+ height: 50px+ iconStyle:+ padding-bottom: 15px+ imageTag: "stable-tensorrt-jp6"+ autoHardware: []+ helpText: "NVIDIA Jetson devices automatically configure runtime: nvidia."+ helpType: "info"+ runtime: "nvidia"++ - id: "stable-rocm"+ name: "AMD GPU"+ description: "ROCm acceleration"+ icon: "https://www.amd.com/content/dam/code/images/header/amd-header-logo.svg"+ iconStyle:+ filter: invert(1)+ background-repeat: no-repeat+ background-position: right center+ background-size: 338% 90%+ iconDark: "https://www.amd.com/content/dam/code/images/header/amd-header-logo.svg"+ iconDarkStyle:+ filter: invert(0)+ background-repeat: no-repeat+ background-position: right center+ background-size: 338% 90%+ imageTag: "stable-rocm"+ autoHardware:+ - "gpu"+ helpText: "AMD GPU automatically configures LIBVA_DRIVER_NAME environment variable and /dev/dri device mapping."+ helpType: "info"+ env:+ LIBVA_DRIVER_NAME: "radeonsi"++ - id: "apple-silicon"+ name: "Apple Silicon"+ description: "Mac M-series processor"+ icon: '<svg height="44" viewBox="0 0 14 44" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m13.0729 17.6825a3.61 3.61 0 0 0 -1.7248 3.0365 3.5132 3.5132 0 0 0 2.1379 3.2223 8.394 8.394 0 0 1 -1.0948 2.2618c-.6816.9812-1.3943 1.9623-2.4787 1.9623s-1.3633-.63-2.613-.63c-1.2187 0-1.6525.6507-2.644.6507s-1.6834-.9089-2.4787-2.0243a9.7842 9.7842 0 0 1 -1.6628-5.2776c0-3.0984 2.014-4.7405 3.9969-4.7405 1.0535 0 1.9314.6919 2.5924.6919.63 0 1.6112-.7333 2.8092-.7333a3.7579 3.7579 0 0 1 3.1604 1.5802zm-3.7284-2.8918a3.5615 3.5615 0 0 0 .8469-2.22 1.5353 1.5353 0 0 0 -.031-.32 3.5686 3.5686 0 0 0 -2.3445 1.2084 3.4629 3.4629 0 0 0 -.8779 2.1585 1.419 1.419 0 0 0 .031.2892 1.19 1.19 0 0 0 .2169.0207 3.0935 3.0935 0 0 0 2.1586-1.1368z"></path></svg>'+ svgStyle:+ width: 90px+ height: 90px+ svgDarkStyle:+ width: 90px+ height: 90px+ fill: white+ imageTag: "stable"+ imageTagSuffix: "-standard-arm64"+ autoHardware: []+ helpText: "Apple Silicon (M-series) requires an [external detector](/configuration/object_detectors#apple-silicon-detector) running on the host."+ helpType: "warning"+ extraHosts:+ - "host.docker.internal:host-gateway"++ - id: "raspberry-pi"+ name: "Raspberry Pi"+ description: "ARM device"+ icon: '<svg focusable="false" height="44" viewBox="0 0 40 56" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero" fill="none"><path d="M65.275 33.317h-4.477v9.46c0 .29-.235.526-.525.526h-4.57a.525.525 0 0 1-.526-.525V16.55a.525.525 0 0 1 .525-.525h9.61c3.223 0 5.709.718 7.457 2.154a7.437 7.437 0 0 1 2.623 6.09 8.391 8.391 0 0 1-1.208 4.655 8.24 8.24 0 0 1-3.663 2.97l5.635 10.638a.525.525 0 0 1-.464.77h-4.917a.63.63 0 0 1-.56-.342l-4.94-9.643Zm-4.477-4.552h4.534a4.641 4.641 0 0 0 3.278-1.078 3.85 3.85 0 0 0 1.162-2.97 4.122 4.122 0 0 0-1.096-3.034 4.556 4.556 0 0 0-3.363-1.106h-4.515v8.188ZM90.426 42.997a6.562 6.562 0 0 1-.402-1.511 6.551 6.551 0 0 1-5.114 2.192 7.195 7.195 0 0 1-4.937-1.724 5.542 5.542 0 0 1-1.958-4.347 5.73 5.73 0 0 1 2.389-4.946c1.592-1.148 3.894-1.73 6.904-1.742h2.491v-1.162a3.342 3.342 0 0 0-.72-2.248 2.838 2.838 0 0 0-2.277-.843 3.226 3.226 0 0 0-2.145.656 2.13 2.13 0 0 0-.748 1.37.513.513 0 0 1-.513.428h-4.375a.533.533 0 0 1-.524-.596 5.494 5.494 0 0 1 1.054-2.663 7.184 7.184 0 0 1 3.073-2.352 11.2 11.2 0 0 1 4.459-.852 8.848 8.848 0 0 1 5.948 1.883 6.587 6.587 0 0 1 2.202 5.292v8.787a9.948 9.948 0 0 0 .629 3.93.525.525 0 0 1-.47.754h-4.485a.515.515 0 0 1-.48-.306Zm-4.336-3.46c.77.007 1.529-.176 2.21-.534a3.509 3.509 0 0 0 1.5-1.433v-3.485h-2.024c-2.71 0-4.153.937-4.328 2.81l-.019.319a2.166 2.166 0 0 0 .712 1.667 2.764 2.764 0 0 0 1.949.656ZM109.963 37.701a1.745 1.745 0 0 0-.983-1.564 11.18 11.18 0 0 0-3.157-1.021c-4.822-1.012-7.232-3.06-7.232-6.145a5.57 5.57 0 0 1 2.24-4.506 9.031 9.031 0 0 1 5.854-1.808 9.723 9.723 0 0 1 6.173 1.817 5.699 5.699 0 0 1 2.292 4.175.52.52 0 0 1-.525.546h-4.382a.514.514 0 0 1-.514-.435 2.538 2.538 0 0 0-.721-1.485 3.172 3.172 0 0 0-2.342-.759 3.24 3.24 0 0 0-2.117.619c-.483.377-.76.96-.75 1.573.001.603.327 1.158.853 1.452a8.76 8.76 0 0 0 2.876.956 23.54 23.54 0 0 1 3.41.908c2.86 1.05 4.29 2.867 4.29 5.452a5.288 5.288 0 0 1-2.38 4.487 10.264 10.264 0 0 1-6.145 1.715c-1.556.029-3.1-.281-4.524-.91a7.586 7.586 0 0 1-3.1-2.49 5.853 5.853 0 0 1-1.094-2.824.533.533 0 0 1 .523-.596h4.11a.513.513 0 0 1 .513.418c.091.71.46 1.354 1.024 1.793a4.233 4.233 0 0 0 2.66.768c.827.057 1.65-.15 2.352-.59.508-.35.807-.93.796-1.546ZM136.719 33.355a12.159 12.159 0 0 1-2.127 7.503 6.817 6.817 0 0 1-5.742 2.82 6.315 6.315 0 0 1-4.965-2.136v9.03c0 .29-.235.525-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.018c.27 0 .497.206.523.475l.142 1.51a6.363 6.363 0 0 1 5.134-2.36 6.865 6.865 0 0 1 5.826 2.773c1.387 1.848 2.08 4.396 2.08 7.644v.28Zm-5.415-.394a7.982 7.982 0 0 0-1.002-4.365 3.266 3.266 0 0 0-2.913-1.536 3.546 3.546 0 0 0-3.504 1.948v8.3a3.605 3.605 0 0 0 3.541 2.004c2.586 0 3.878-2.117 3.878-6.35ZM158.159 33.355c0 3.247-.694 5.78-2.08 7.597a6.889 6.889 0 0 1-5.808 2.726 6.329 6.329 0 0 1-5.264-2.53l-.191 1.689a.525.525 0 0 1-.522.466h-3.877a.525.525 0 0 1-.525-.525V15.05c0-.29.235-.525.525-.525h4.364a.525.525 0 0 1 .525.525v9.798a6.166 6.166 0 0 1 4.928-2.192 6.945 6.945 0 0 1 5.817 2.726c1.405 1.817 2.108 4.374 2.108 7.672v.3Zm-5.415-.394a8.068 8.068 0 0 0-.974-4.487 3.295 3.295 0 0 0-2.904-1.414 3.572 3.572 0 0 0-3.56 2.117v8a3.62 3.62 0 0 0 3.597 2.135c1.626.093 3.081-.999 3.448-2.585.31-1.23.442-2.498.393-3.766ZM170.555 43.678a9.95 9.95 0 0 1-7.26-2.736 9.722 9.722 0 0 1-2.8-7.288v-.524a12.247 12.247 0 0 1 1.18-5.461 8.666 8.666 0 0 1 3.344-3.71 9.387 9.387 0 0 1 4.936-1.302 8.413 8.413 0 0 1 6.548 2.623c1.593 1.749 2.39 4.228 2.39 7.438v1.685a.525.525 0 0 1-.526.525h-12.383a5.028 5.028 0 0 0 1.583 3.185 4.785 4.785 0 0 0 3.344 1.2 5.886 5.886 0 0 0 4.524-1.837.527.527 0 0 1 .773.026l1.964 2.198c.17.188.182.47.028.672a8.216 8.216 0 0 1-3.036 2.34 10.82 10.82 0 0 1-4.609.966Zm-.618-16.656a3.382 3.382 0 0 0-2.614 1.092 5.65 5.65 0 0 0-1.283 3.124h7.531v-.433a4.034 4.034 0 0 0-.974-2.795 3.492 3.492 0 0 0-2.66-.988ZM193.333 27.525a.523.523 0 0 1-.575.515c-.459-.051-.92-.078-1.382-.081-2.049 0-3.391.693-4.028 2.08v12.739a.525.525 0 0 1-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.096c.277 0 .507.215.524.492l.12 1.924a5.017 5.017 0 0 1 4.514-2.791c.434-.002.867.044 1.29.138a.515.515 0 0 1 .39.515l-.06 4.215ZM207.017 27.525a.523.523 0 0 1-.575.515c-.459-.051-.92-.078-1.382-.081-2.048 0-3.39.693-4.028 2.08v12.739a.525.525 0 0 1-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.096c.277 0 .507.215.524.492l.12 1.924a5.018 5.018 0 0 1 4.514-2.791c.434-.002.867.044 1.29.138a.515.515 0 0 1 .39.515l-.06 4.215ZM217.934 35.64l3.635-12.233a.525.525 0 0 1 .504-.375h4.677a.525.525 0 0 1 .496.697l-7.907 22.721-.45 1.068a6.18 6.18 0 0 1-5.995 3.972 8.368 8.368 0 0 1-2.003-.25.529.529 0 0 1-.395-.513v-3.15a.525.525 0 0 1 .546-.524l.538.02a3.442 3.442 0 0 0 2.035-.492 3.08 3.08 0 0 0 1.19-1.555l.637-1.667-6.857-19.63a.525.525 0 0 1 .496-.697h4.696c.232 0 .437.152.503.374l3.654 12.234ZM245.156 33.692v9.086c0 .29-.235.525-.525.525h-4.57a.525.525 0 0 1-.526-.525V16.55a.525.525 0 0 1 .525-.525h10.117a12.31 12.31 0 0 1 5.405 1.124 8.284 8.284 0 0 1 3.587 3.194 8.91 8.91 0 0 1 1.256 4.712 7.833 7.833 0 0 1-2.745 6.323c-1.83 1.543-4.362 2.314-7.597 2.314h-4.927Zm0-4.553h5.02a4.934 4.934 0 0 0 3.401-1.049 3.816 3.816 0 0 0 1.171-2.998 4.5 4.5 0 0 0-1.18-3.24 4.41 4.41 0 0 0-3.26-1.275h-5.152v8.562ZM263.081 17.786a2.666 2.666 0 0 1 .815-2.005 3.512 3.512 0 0 1 4.431 0 2.86 2.86 0 0 1-.01 4.028 3.473 3.473 0 0 1-4.402 0 2.66 2.66 0 0 1-.834-2.023Zm5.227 25.517h-4.383a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.383a.525.525 0 0 1 .525.525v19.22a.525.525 0 0 1-.525.526ZM45.008 32.949a8.74 8.74 0 0 0-3.104-6.182 7.664 7.664 0 0 0-1.44-2.801 8.594 8.594 0 0 0-3.058-5.777c.284-.244.524-.536.708-.862a6.186 6.186 0 0 0 3.63-4.23 5.558 5.558 0 0 0 1.755-3.64 3.481 3.481 0 0 0-.31-1.638 3.114 3.114 0 0 0 .81-3.215c-.606-1.756-2.73-2.896-5.584-3.017a4.497 4.497 0 0 0-3.11-1.065 7.188 7.188 0 0 0-1.678.207 3.821 3.821 0 0 0-1.65-.334 6.458 6.458 0 0 0-3.148.858 2.894 2.894 0 0 0-.38-.025 6.276 6.276 0 0 0-3.551 1.558 10.765 10.765 0 0 0-1.866 1.944 10.768 10.768 0 0 0-1.867-1.944 6.278 6.278 0 0 0-3.55-1.558c-.127 0-.254.008-.38.025a6.46 6.46 0 0 0-3.148-.858 3.822 3.822 0 0 0-1.65.334 7.188 7.188 0 0 0-1.68-.207 4.498 4.498 0 0 0-3.109 1.065c-2.854.12-4.978 1.261-5.585 3.018a3.114 3.114 0 0 0 .812 3.214 3.482 3.482 0 0 0-.31 1.639 5.557 5.557 0 0 0 1.755 3.64 6.186 6.186 0 0 0 3.63 4.229c.183.326.423.618.707.862A8.594 8.594 0 0 0 5.6 23.966a7.663 7.663 0 0 0-1.44 2.801 8.74 8.74 0 0 0-3.104 6.182 8.424 8.424 0 0 0 1.92 6.578c.26 1.31.8 2.549 1.581 3.632a9.452 9.452 0 0 0 2.386 5.514 9.768 9.768 0 0 0 5.262 3.126 12.74 12.74 0 0 0 4.208 2.605 9.763 9.763 0 0 0 13.24 0c1.559-.585 2.988-1.47 4.207-2.605a9.768 9.768 0 0 0 5.262-3.126 9.452 9.452 0 0 0 2.386-5.514 9.311 9.311 0 0 0 1.582-3.632 8.424 8.424 0 0 0 1.919-6.578Z" fill="#000"></path><path d="M28.366 4.192a.225.225 0 0 1 .286.24c-.072.672.335.587.432.468a3.526 3.526 0 0 1 3.188-1.53.225.225 0 0 1 .154.363c-.4.593.03.706.19.6 1.631-1.02 3.187-1.023 3.785-.594a.225.225 0 0 1 .013.349c-.604.514-.266.77-.052.692a5.802 5.802 0 0 1 4.74.607.227.227 0 0 1 .006.343 4.493 4.493 0 0 0-1.73 3.018c-.045.396.614.313.891.241a.225.225 0 0 1 .28.21c.026.954-.876 2.002-2.218 2.898-.18.12-.154.408.256.42a.222.222 0 0 1 .191.334c-.478.888-1.13 1.724-3.345 2.298a.227.227 0 0 0-.032.429.217.217 0 0 1 .071.384c-2.207 1.896-7.8 1.148-8.51-2.043a.224.224 0 0 1 .04-.182 21.262 21.262 0 0 1 9.276-7.058.176.176 0 0 0-.087-.34 15.168 15.168 0 0 0-10.074 6.074.227.227 0 0 1-.289.065c-3.585-1.851-.64-7.317 2.538-8.286ZM7.285 12.85a.222.222 0 0 1 .191-.334c.41-.01.436-.299.256-.419C6.39 11.201 5.49 10.153 5.514 9.2a.225.225 0 0 1 .28-.21c.278.072.936.155.891-.241a4.493 4.493 0 0 0-1.73-3.017.227.227 0 0 1 .006-.344 5.802 5.802 0 0 1 4.74-.607c.214.079.552-.178-.052-.692a.225.225 0 0 1 .014-.35c.597-.428 2.153-.426 3.785.594.159.107.589-.006.19-.599a.225.225 0 0 1 .153-.363A3.526 3.526 0 0 1 16.98 4.9c.096.12.503.204.432-.469a.225.225 0 0 1 .286-.239c3.178.97 6.122 6.435 2.537 8.286a.227.227 0 0 1-.289-.065A15.168 15.168 0 0 0 9.873 6.34a.176.176 0 0 0-.088.34 21.262 21.262 0 0 1 9.276 7.057c.04.052.054.119.04.183-.71 3.19-6.303 3.938-8.51 2.042a.217.217 0 0 1 .071-.384.227.227 0 0 0-.031-.429c-2.216-.574-2.867-1.41-3.346-2.298Z" fill="#46AF4B"></path><path d="M37.158 22.605c.92 2.446.203 3.622-1.978 2.377a15.632 15.632 0 0 1-4.58-3.84c-1.644-1.952-.576-2.821 2.012-2.352a6.985 6.985 0 0 1 4.546 3.815ZM27.375 19.853c3.12 2.593-.454 4.428-4.343 4.428-3.89 0-7.463-1.835-4.344-4.428a6.935 6.935 0 0 1 8.687 0ZM8.906 22.605a6.985 6.985 0 0 1 4.545-3.815c2.588-.47 3.656.4 2.013 2.352a15.632 15.632 0 0 1-4.58 3.84c-2.182 1.245-2.898.069-1.978-2.377ZM4.394 36.196a6.983 6.983 0 0 1 .518-5.942c1.153-1.96 2.313-1.883 2.773-.222.585 2.29.373 4.712-.6 6.867-.854 1.696-1.921 1.123-2.691-.703ZM12.704 48.896A6.942 6.942 0 0 1 7.482 42.7c.433-10.066 14.94 7.91 5.222 6.196ZM12.999 36.358c-2.433-1.404-3.077-4.844-1.438-7.682 1.639-2.839 4.94-4 7.372-2.596 2.433 1.404 3.077 4.844 1.438 7.682-1.639 2.839-4.94 4-7.372 2.596ZM27.091 52.737a6.947 6.947 0 0 1-8.119 0c-2.41-1.664.015-3.58 4.06-3.58s6.47 1.916 4.06 3.58Z" fill="#CD2355"></path><ellipse fill="#CD2355" cx="23.032" cy="41.795" rx="5.647" ry="4.84"></ellipse><path d="M25.692 33.762c-1.639-2.838-.995-6.278 1.438-7.682 2.433-1.405 5.734-.243 7.372 2.596 1.64 2.838.995 6.278-1.438 7.682-2.432 1.405-5.733.243-7.372-2.596ZM33.36 48.896C23.64 50.61 38.149 32.634 38.58 42.7a6.941 6.941 0 0 1-5.221 6.196ZM41.67 36.196c-.77 1.826-1.838 2.399-2.691.703a10.417 10.417 0 0 1-.6-6.867c.46-1.66 1.62-1.739 2.772.222a6.983 6.983 0 0 1 .518 5.942Z" fill="#CD2355"></path></g></svg>'+ svgStyle:+ width: 40px+ height: 40px+ transform: translateX(-3px)+ imageTag: "stable"+ imageTagSuffix: "-standard-arm64"+ autoHardware:+ - "video11"+ helpText: "Raspberry Pi automatically configures the video11 device (RPi 4) and uses the arm64 image."+ helpType: "info"++ - id: "stable-rk"+ name: "Rockchip"+ description: "Rockchip SoC board"+ icon: "https://www.rock-chips.com/favicon.ico"+ imageTag: "stable-rk"+ autoHardware:+ - "gpu"+ helpText: "Rockchip devices automatically configure /dev/dri device mapping."+ helpType: "info"+ devices:+ - host: "/dev/dma_heap"+ comment: "Rockchip DMA heap"+ - host: "/dev/rga"+ comment: "Rockchip RGA"+ - host: "/dev/mpp_service"+ comment: "Rockchip MPP service"+ volumes:+ - host: "/sys/"+ container: "/sys/"+ readOnly: true+ comment: "Rockchip system info"+ securityOpt:+ - "apparmor=unconfined"+ - "systempaths=unconfined"++ - id: "stable-synaptics"+ name: "Synaptics"+ description: "Synaptics NPU"+ icon: "🔷"+ imageTag: "stable-synaptics"+ autoHardware: []+ helpText: "Synaptics devices automatically configure /dev/synap and video devices."+ helpType: "info"+ devices:+ - host: "/dev/synap"+ comment: "Synaptics NPU"+ - host: "/dev/video0"+ comment: "Video device 0"+ - host: "/dev/video1"+ comment: "Video device 1"++hardware:+ - id: "usbCoral"+ label: "USB Coral (TPU)"+ description: "Enable this if you have a Google Coral USB TPU. Other Coral versions require different device paths."+ disabledWhen:+ - "apple-silicon"+ - "stable-synaptics"+ devices:+ - host: "/dev/bus/usb"+ container: "/dev/bus/usb"+ comment: "USB Coral — modify for other versions"++ - id: "pcieCoral"+ label: "PCIe Coral (TPU)"+ description: "Enable this if you have a Google Coral PCIe/M.2 TPU. You also need to [install the driver](https://github.com/jnicolson/gasket-builder)."+ disabledWhen:+ - "apple-silicon"+ - "stable-synaptics"+ devices:+ - host: "/dev/apex_0"+ container: "/dev/apex_0"+ comment: "PCIe Coral — follow driver instructions at https://github.com/jnicolson/gasket-builder"++ - id: "gpu"+ label: "Intel/AMD GPU (/dev/dri)"+ description: "Pass through /dev/dri for GPU hardware acceleration (Intel/AMD)."+ disabledWhen:+ - "stable-tensorrt-jp6"+ - "apple-silicon"+ devices:+ - host: "/dev/dri"+ container: "/dev/dri"+ comment: "Intel/AMD GPU hardware acceleration"++ - id: "intelNpu"+ label: "Intel NPU (/dev/accel)"+ description: "Pass through /dev/accel for Intel NPU acceleration."+ disabledWhen:+ - "stable-tensorrt-jp6"+ - "apple-silicon"+ - "stable-rocm"+ - "stable-rk"+ - "stable-synaptics"+ devices:+ - host: "/dev/accel"+ container: "/dev/accel"+ comment: "Intel NPU"++ - id: "hailo"+ label: "Hailo NPU (/dev/hailo0)"+ description: "Pass through /dev/hailo0 for Hailo-8 / Hailo-8L NPU acceleration. You also need to [install the driver](#hailo-8)."+ disabledWhen:+ - "apple-silicon"+ - "stable-synaptics"+ devices:+ - host: "/dev/hailo0"+ comment: "Hailo NPU"++ - id: "memryx"+ label: "MemryX MX3 (/dev/memx0)"+ description: "Pass through /dev/memx0 for MemryX MX3 NPU acceleration. You also need to [install the driver](#memryx-mx3)."+ disabledWhen:+ - "apple-silicon"+ - "stable-synaptics"+ devices:+ - host: "/dev/memx0"+ comment: "MemryX MX3 NPU"+ volumes:+ - host: "/run/mxa_manager"+ container: "/run/mxa_manager"+ comment: "MemryX manager"++ - id: "axera"+ label: "AXERA Accelerator"+ description: "Pass through AXERA accelerator devices. Requires the [AXCL driver](#axera) to be installed first."+ disabledWhen:+ - "apple-silicon"+ - "stable-synaptics"+ devices:+ - host: "/dev/axcl_host"+ comment: "AXERA accelerator device"+ - host: "/dev/ax_mmb_dev"+ comment: "AXERA MMB device"+ - host: "/dev/msg_userdev"+ comment: "AXERA message device"+ volumes:+ - host: "/usr/bin/axcl"+ container: "/usr/bin/axcl"+ comment: "AXERA binaries"+ - host: "/usr/lib/axcl"+ container: "/usr/lib/axcl"+ comment: "AXERA libraries"++ - id: "video11"+ label: "Raspberry Pi (/dev/video11)"+ description: "Pass through /dev/video11 for Raspberry Pi 4B hardware acceleration."+ disabledWhen:+ - "stable-tensorrt"+ - "stable-tensorrt-jp6"+ - "stable-rocm"+ - "stable-rk"+ - "stable-synaptics"+ - "intel"+ - "apple-silicon"+ - "stable"+ devices:+ - host: "/dev/video11"+ container: "/dev/video11"+ comment: "Raspberry Pi 4B"++ports:+ - id: "8971"+ host: 8971+ container: 8971+ protocol: "tcp"+ description: "Authenticated UI and API access (default HTTPS)"+ defaultEnabled: true+ warningContent: "This is the access port for Frigate. Closing it means you will no longer be able to access the instance."+ warningWhen: "unchecked"++ - id: "8554"+ host: 8554+ container: 8554+ protocol: "tcp"+ description: "Access RTSP feeds from go2rtc"+ defaultEnabled: true++ - id: "8555-tcp"+ host: 8555+ container: 8555+ protocol: "tcp"+ description: "WebRTC over TCP"+ defaultEnabled: true++ - id: "8555-udp"+ host: 8555+ container: 8555+ protocol: "udp"+ description: "WebRTC over UDP"+ defaultEnabled: true++ - id: "1984"+ host: 1984+ container: 1984+ protocol: "tcp"+ description: "Go2RTC Web UI"+ defaultEnabled: falsediff --git a/docs/src/components/DockerComposeGenerator/config/index.ts b/docs/src/components/DockerComposeGenerator/config/index.tsnew file mode 100644index 0000000000..5acaba9f1b--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/config/index.ts@@ -0,0 +1,12 @@+export { devices, deviceMap } from "./devices";+export { hardwareOptions, hardwareMap } from "./hardware";+export { ports, portMap } from "./ports";++export type {+ DeviceConfig,+ DeviceMapping,+ VolumeMapping,+ HardwareOption,+ PortConfig,+ NvidiaDeployConfig,+} from "./types";diff --git a/docs/src/components/DockerComposeGenerator/config/types.ts b/docs/src/components/DockerComposeGenerator/config/types.tsnew file mode 100644index 0000000000..87bcb608dd--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/config/types.ts@@ -0,0 +1,154 @@+/**+ * Type definitions for the Docker Compose Generator configuration.+ * All device, hardware, and port options are declaratively defined+ * so that adding a new device only requires editing config files.+ */++/** A single device mapping entry (e.g. /dev/dri:/dev/dri) */+export interface DeviceMapping {+ /** Host device path */+ host: string;+ /** Container device path (defaults to host if omitted) */+ container?: string;+ /** Inline comment for this device line */+ comment?: string;+}++/** A single volume mapping entry */+export interface VolumeMapping {+ /** Host path */+ host: string;+ /** Container path */+ container: string;+ /** Whether the mount is read-only */+ readOnly?: boolean;+ /** Inline comment */+ comment?: string;+}++/** NVIDIA deploy configuration for docker-compose */+export interface NvidiaDeployConfig {+ /** "all" or a specific number */+ count: string;+ /** Specific GPU device IDs (when count is a number) */+ deviceIds?: string[];+}++/** Full device type definition */+export interface DeviceConfig {+ /** Unique identifier, e.g. "intel" */+ id: string;+ /** Display name, e.g. "Intel GPU" */+ name: string;+ /** Short description */+ description: string;+ /**+ * Icon for the device card. Supports:+ * - Emoji string (e.g. "🖥️")+ * - Image URL or static path (e.g. "/img/intel.svg", "https://example.com/icon.png")+ * - Inline SVG markup (e.g. "<svg>...</svg>")+ */+ icon: string;+ /**+ * Additional CSS properties applied to the icon element.+ * - For image-type icons: if any `background-*` property (e.g. `background-size`,+ * `background-position`) is present, the image is rendered as a CSS `background-image`+ * on the container div, enabling full background positioning control.+ * Otherwise the image is rendered as an `<img>` tag and styles apply to it.+ * - For emoji/SVG icons: styles apply to the container div.+ */+ iconStyle?: Record<string, string>;+ /**+ * Additional CSS properties applied directly to the inner `<svg>` element+ * when the icon is an inline SVG. Use this to override the default+ * `width: 100%; height: 100%` or set `fill`, `transform`, etc.+ * Ignored for emoji and image-type icons.+ */+ svgStyle?: Record<string, string>;+ /**+ * Icon for dark mode. Same format as `icon`. When provided, this icon+ * replaces `icon` when the user is in dark mode.+ */+ iconDark?: string;+ /** Additional CSS properties for the dark mode icon container */+ iconDarkStyle?: Record<string, string>;+ /**+ * SVG-specific styles for dark mode. Same as `svgStyle` but applied+ * when dark mode is active. Merged over `svgStyle` in dark mode.+ */+ svgDarkStyle?: Record<string, string>;+ /** Docker image tag, e.g. "stable" */+ imageTag: string;+ /**+ * Image tag suffix appended to the base tag.+ * e.g. "-standard-arm64" produces "stable-standard-arm64"+ */+ imageTagSuffix?: string;+ /** Hardware option IDs to auto-enable when this device is selected */+ autoHardware: string[];+ /** Help text shown as an admonition when this device is selected */+ helpText?: string;+ /** Admonition type for help text */+ helpType?: "info" | "warning" | "danger";+ /** Device mappings always added for this device type */+ devices?: DeviceMapping[];+ /** Volume mappings always added for this device type */+ volumes?: VolumeMapping[];+ /** Extra environment variables for this device type */+ env?: Record<string, string>;+ /** NVIDIA deploy config (only for tensorrt) */+ nvidiaDeploy?: NvidiaDeployConfig;+ /** Runtime setting, e.g. "nvidia" for Jetson */+ runtime?: string;+ /** Extra hosts entries, e.g. "host.docker.internal:host-gateway" */+ extraHosts?: string[];+ /** Security options, e.g. ["apparmor=unconfined"] */+ securityOpt?: string[];+ /** Whether this device type needs the NVIDIA GPU config UI */+ needsNvidiaConfig?: boolean;+}++/** Generic hardware acceleration option definition */+export interface HardwareOption {+ /** Unique identifier, e.g. "usbCoral" */+ id: string;+ /** Display label */+ label: string;+ /**+ * Description shown below the checkbox when this option is enabled.+ * Supports markdown link syntax: [text](url)+ */+ description?: string;+ /** Device IDs that disable this option */+ disabledWhen?: string[];+ /** Device mappings added when this option is enabled */+ devices?: DeviceMapping[];+ /** Volume mappings added when this option is enabled */+ volumes?: VolumeMapping[];+ /** Extra environment variables */+ env?: Record<string, string>;+}++/** Port definition */+export interface PortConfig {+ /** Unique identifier (also the default host port as string) */+ id: string;+ /** Host port number */+ host: number;+ /** Container port number */+ container: number;+ /** Protocol */+ protocol?: "tcp" | "udp";+ /** Description of the port's purpose */+ description: string;+ /** Whether enabled by default */+ defaultEnabled: boolean;+ /** Whether this port is locked (always enabled, cannot be toggled off) */+ locked?: boolean;+ /** Admonition type for the warning */+ warningType?: "warning" | "danger";+ /** Warning content (markdown) */+ warningContent?: string;+ /** When to show the warning: when the port is checked or unchecked */+ warningWhen?: "checked" | "unchecked";+}diff --git a/docs/src/components/DockerComposeGenerator/generator/index.ts b/docs/src/components/DockerComposeGenerator/generator/index.tsnew file mode 100644index 0000000000..f6091f7c01--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/generator/index.ts@@ -0,0 +1,250 @@+import type {+ DeviceConfig,+ DeviceMapping,+ VolumeMapping,+} from "../config/types";+import { hardwareMap } from "../config";++// ---------------------------------------------------------------------------+// Input type+// ---------------------------------------------------------------------------++export interface GeneratorInput {+ device: DeviceConfig;+ selectedHardware: string[];+ enabledPorts: string[];+ configPath: string;+ mediaPath: string;+ rtspPassword?: string;+ timezone: string;+ shmSize: string;+ nvidiaGpuCount?: string;+ nvidiaGpuDeviceId?: string;+}++// ---------------------------------------------------------------------------+// Helpers+// ---------------------------------------------------------------------------++function deviceLine(dm: DeviceMapping): string {+ const host = dm.host;+ const container = dm.container ?? dm.host;+ const mapping = host === container ? host : `${host}:${container}`;+ const comment = dm.comment ? ` # ${dm.comment}` : "";+ return ` - ${mapping}${comment}`;+}++function volumeLine(vm: VolumeMapping): string {+ const ro = vm.readOnly ? ":ro" : "";+ const comment = vm.comment ? ` # ${vm.comment}` : "";+ return ` - ${vm.host}:${vm.container}${ro}${comment}`;+}++// ---------------------------------------------------------------------------+// YAML builder — each section returns an array of lines+// ---------------------------------------------------------------------------++function buildImage(device: DeviceConfig): string[] {+ const tag = device.imageTagSuffix+ ? `${device.imageTag}${device.imageTagSuffix}`+ : device.imageTag;+ return [` image: ghcr.io/blakeblackshear/frigate:${tag}`];+}++function buildDevices(+ device: DeviceConfig,+ hwDevices: DeviceMapping[]+): string[] {+ const all: DeviceMapping[] = [+ ...(device.devices ?? []),+ ...hwDevices,+ ];+ if (all.length === 0) return [];+ return [+ " devices:",+ ...all.map(deviceLine),+ ];+}++function buildVolumes(+ device: DeviceConfig,+ hwVolumes: VolumeMapping[],+ configPath: string,+ mediaPath: string+): string[] {+ const all: VolumeMapping[] = [+ ...(device.volumes ?? []),+ ...hwVolumes,+ ];+ return [+ " volumes:",+ " - /etc/localtime:/etc/localtime:ro # Sync host time",+ ` - ${configPath}:/config # Config file directory`,+ ` - ${mediaPath}:/media/frigate # Recording storage directory`,+ " - type: tmpfs # 1GB in-memory filesystem for recording segment storage",+ " target: /tmp/cache",+ " tmpfs:",+ " size: 1000000000",+ ...all.map(volumeLine),+ ];+}++function buildPorts(enabledPorts: string[]): string[] {+ return [+ " ports:",+ ...enabledPorts,+ ];+}++function buildEnvironment(+ device: DeviceConfig,+ hwEnv: Record<string, string>,+ rtspPassword: string | undefined,+ timezone: string+): string[] {+ const allEnv: Record<string, string> = {+ ...hwEnv,+ ...(device.env ?? {}),+ };++ const lines: string[] = [" environment:"];++ if (rtspPassword) {+ lines.push(+ ` FRIGATE_RTSP_PASSWORD: "${rtspPassword}" # RTSP password — change to your own`+ );+ }++ lines.push(` TZ: "${timezone}" # Timezone`);++ for (const [key, value] of Object.entries(allEnv)) {+ lines.push(` ${key}: "${value}"`);+ }++ return lines;+}++function buildDeploy(device: DeviceConfig, input: GeneratorInput): string[] {+ if (device.id === "stable-tensorrt") {+ const count = input.nvidiaGpuCount || "all";+ const isAll = count === "all";+ const deviceId = input.nvidiaGpuDeviceId?.trim();++ if (isAll) {+ return [+ " deploy:",+ " resources:",+ " reservations:",+ " devices:",+ " - driver: nvidia",+ " count: all # Use all GPUs",+ " capabilities: [gpu]",+ ];+ }++ if (deviceId) {+ const ids = deviceId+ .split(",")+ .map((s) => s.trim())+ .filter(Boolean)+ .map((s) => `'${s}'`)+ .join(", ");+ return [+ " deploy:",+ " resources:",+ " reservations:",+ " devices:",+ " - driver: nvidia",+ ` device_ids: [${ids}] # GPU device IDs`,+ ` count: ${count} # GPU count`,+ " capabilities: [gpu]",+ ];+ }++ return [+ " deploy:",+ " resources:",+ " reservations:",+ " devices:",+ " - driver: nvidia",+ ` count: ${count} # GPU count`,+ " capabilities: [gpu]",+ ];+ }++ return [];+}++function buildRuntime(device: DeviceConfig): string[] {+ if (device.runtime) {+ return [` runtime: ${device.runtime}`];+ }+ return [];+}++function buildExtraHosts(device: DeviceConfig): string[] {+ if (!device.extraHosts?.length) return [];+ return [+ " extra_hosts:",+ ...device.extraHosts.map(+ (h, i) =>+ ` - "${h}"${i === 0 ? " # Required to talk to the NPU detector" : ""}`+ ),+ ];+}++function buildSecurityOpt(device: DeviceConfig): string[] {+ if (!device.securityOpt?.length) return [];+ return [+ " security_opt:",+ ...device.securityOpt.map((s) => ` - ${s}`),+ ];+}++// ---------------------------------------------------------------------------+// Public API+// ---------------------------------------------------------------------------++/**+ * Generate a docker-compose YAML string from the given input.+ * The output is pure YAML with inline comments (no Shiki annotations).+ */+export function generateDockerCompose(input: GeneratorInput): string {+ const { device } = input;++ // Collect hardware-level devices, volumes, and env+ const hwDevices: DeviceMapping[] = [];+ const hwVolumes: VolumeMapping[] = [];+ const hwEnv: Record<string, string> = {};++ for (const hwId of input.selectedHardware) {+ const hw = hardwareMap.get(hwId);+ if (!hw) continue;+ // Skip GPU device mapping for tensorrt images (it uses deploy instead)+ if (hw.id === "gpu" && device.imageTag === "stable-tensorrt") continue;+ hwDevices.push(...(hw.devices ?? []));+ hwVolumes.push(...(hw.volumes ?? []));+ Object.assign(hwEnv, hw.env ?? {});+ }++ const lines: string[] = [+ "services:",+ " frigate:",+ " container_name: frigate",+ " privileged: true # This may not be necessary for all setups",+ " restart: unless-stopped",+ " stop_grace_period: 30s # Allow enough time to shut down the various services",+ ...buildImage(device),+ ` shm_size: "${input.shmSize || "512mb"}" # Update for your cameras based on SHM calculation`,+ ...buildRuntime(device),+ ...buildDeploy(device, input),+ ...buildExtraHosts(device),+ ...buildSecurityOpt(device),+ ...buildDevices(device, hwDevices),+ ...buildVolumes(device, hwVolumes, input.configPath, input.mediaPath),+ ...buildPorts(input.enabledPorts),+ ...buildEnvironment(device, hwEnv, input.rtspPassword, input.timezone),+ ];++ return lines.join("\n");+}diff --git a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.tsnew file mode 100644index 0000000000..19c3976d8d--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts@@ -0,0 +1,195 @@+import { useState, useCallback, useMemo } from "react";+import { deviceMap, hardwareMap, portMap } from "../config";+import { generateDockerCompose } from "../generator";+import type { GeneratorInput } from "../generator";++/**+ * Main hook that holds all form state and generates the Docker Compose output.+ * Configuration is loaded synchronously from build-time generated .ts files.+ */+export function useConfigGenerator() {+ const [deviceId, setDeviceId] = useState("stable");++ const [hardwareEnabled, setHardwareEnabled] = useState<Record<string, boolean>>(() => {+ const defaultDevice = deviceMap.get("stable");+ const initial: Record<string, boolean> = {};+ if (defaultDevice) {+ for (const hwId of defaultDevice.autoHardware) {+ initial[hwId] = true;+ }+ }+ return initial;+ });++ const [portEnabled, setPortEnabled] = useState<Record<string, boolean>>(() => {+ const initial: Record<string, boolean> = {};+ for (const p of portMap.values()) {+ initial[p.id] = p.defaultEnabled;+ }+ return initial;+ });++ const [nvidiaGpuCount, setNvidiaGpuCount] = useState("");+ const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");+ const [configPath, setConfigPath] = useState("");+ const [mediaPath, setMediaPath] = useState("");+ const [rtspPassword, setRtspPassword] = useState("");+ const [timezone, setTimezone] = useState("");+ const [shmSize, setShmSize] = useState("512mb");+ const [shmSizeError, setShmSizeError] = useState(false);+ const [gpuDeviceIdError, setGpuDeviceIdError] = useState(false);+ const [configPathError, setConfigPathError] = useState(false);+ const [mediaPathError, setMediaPathError] = useState(false);++ const device = useMemo(() => deviceMap.get(deviceId)!, [deviceId]);++ const selectDevice = useCallback((id: string) => {+ const newDevice = deviceMap.get(id);+ if (!newDevice) return;+ setDeviceId(id);+ setHardwareEnabled(() => {+ const next: Record<string, boolean> = {};+ for (const hwId of newDevice.autoHardware) {+ next[hwId] = true;+ }+ return next;+ });+ setNvidiaGpuCount("");+ setNvidiaGpuDeviceId("");+ setGpuDeviceIdError(false);+ }, []);++ const toggleHardware = useCallback((hwId: string) => {+ setHardwareEnabled((prev) => ({ ...prev, [hwId]: !prev[hwId] }));+ }, []);++ const togglePort = useCallback((portId: string) => {+ const port = portMap.get(portId);+ if (port?.locked) return;+ setPortEnabled((prev) => ({ ...prev, [portId]: !prev[portId] }));+ }, []);++ const isHardwareDisabled = useCallback(+ (hwId: string): boolean => {+ const hw = hardwareMap.get(hwId);+ if (!hw) return false;+ return hw.disabledWhen?.includes(deviceId) ?? false;+ },+ [deviceId]+ );++ const validateShmSize = useCallback((value: string): boolean => {+ if (!value) return true;+ return /^\d+(\.\d+)?[bkmgBKMG]{1,2}$/.test(value);+ }, []);++ const validatePath = useCallback((value: string): boolean => {+ if (!value) return true;+ return /^[a-zA-Z0-9_\-/./]+$/.test(value);+ }, []);++ const handleShmSizeChange = useCallback(+ (value: string) => {+ const filtered = value.replace(/[^0-9.bkmgBKMG]/g, "");+ const valid = validateShmSize(filtered);+ setShmSize(filtered);+ setShmSizeError(!valid && filtered !== "");+ },+ [validateShmSize]+ );++ const handleConfigPathChange = useCallback(+ (value: string) => {+ const filtered = value.replace(/[^a-zA-Z0-9_\-/./]/g, "");+ const valid = validatePath(filtered);+ setConfigPath(filtered);+ setConfigPathError(!valid && filtered !== "");+ },+ [validatePath]+ );++ const handleMediaPathChange = useCallback(+ (value: string) => {+ const filtered = value.replace(/[^a-zA-Z0-9_\-/./]/g, "");+ const valid = validatePath(filtered);+ setMediaPath(filtered);+ setMediaPathError(!valid && filtered !== "");+ },+ [validatePath]+ );++ const handleNvidiaGpuCountChange = useCallback((value: string) => {+ // Only allow digits+ setNvidiaGpuCount(value);+ if (value === "") {+ setNvidiaGpuDeviceId("");+ setGpuDeviceIdError(false);+ } else {+ setGpuDeviceIdError(false);+ }+ }, []);++ const handleNvidiaGpuDeviceIdChange = useCallback((value: string) => {+ setNvidiaGpuDeviceId(value.trim());+ setGpuDeviceIdError(false);+ }, []);++ const enabledPortLines = useMemo(() => {+ const lines: string[] = [];+ for (const [id, enabled] of Object.entries(portEnabled)) {+ if (!enabled) continue;+ const p = portMap.get(id);+ if (!p) continue;+ const proto = p.protocol && p.protocol !== "tcp" ? `/${p.protocol}` : "";+ const comment = p.description ? ` # ${p.description}` : "";+ lines.push(` - "${p.host}:${p.container}${proto}"${comment}`);+ }+ return lines;+ }, [portEnabled]);++ const selectedHardwareIds = useMemo(() => {+ return Object.entries(hardwareEnabled)+ .filter(([id, enabled]) => {+ if (!enabled) return false;+ const hw = hardwareMap.get(id);+ if (!hw) return false;+ if (hw.disabledWhen?.includes(deviceId)) return false;+ return true;+ })+ .map(([id]) => id);+ }, [hardwareEnabled, deviceId]);++ const generatedYaml = useMemo(() => {+ const input: GeneratorInput = {+ device,+ selectedHardware: selectedHardwareIds,+ enabledPorts: enabledPortLines,+ configPath: configPath || "/path/to/your/config",+ mediaPath: mediaPath || "/path/to/your/storage",+ rtspPassword,+ timezone: timezone || Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC",+ shmSize: shmSize || "512mb",+ nvidiaGpuCount,+ nvidiaGpuDeviceId,+ };+ return generateDockerCompose(input);+ }, [+ device, selectedHardwareIds, enabledPortLines,+ configPath, mediaPath, rtspPassword, timezone, shmSize,+ nvidiaGpuCount, nvidiaGpuDeviceId,+ ]);++ const hasAnyHardware = selectedHardwareIds.length > 0 || !!device?.devices?.length;++ return {+ deviceId, device, hardwareEnabled, portEnabled,+ nvidiaGpuCount, nvidiaGpuDeviceId,+ configPath, mediaPath, rtspPassword, timezone, shmSize,+ shmSizeError, gpuDeviceIdError, configPathError, mediaPathError,+ hasAnyHardware, generatedYaml,+ selectDevice, toggleHardware, togglePort,+ handleShmSizeChange, handleConfigPathChange, handleMediaPathChange,+ handleNvidiaGpuCountChange, handleNvidiaGpuDeviceIdChange,+ setRtspPassword, setTimezone, isHardwareDisabled,+ };+}diff --git a/docs/src/components/DockerComposeGenerator/index.ts b/docs/src/components/DockerComposeGenerator/index.tsnew file mode 100644index 0000000000..76dd587560--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/index.ts@@ -0,0 +1 @@+export { default } from "./DockerComposeGenerator";diff --git a/docs/src/components/DockerComposeGenerator/styles.module.css b/docs/src/components/DockerComposeGenerator/styles.module.cssnew file mode 100644index 0000000000..d2e1b62dd8--- /dev/null+++ b/docs/src/components/DockerComposeGenerator/styles.module.css@@ -0,0 +1,381 @@+/* ===================================================================+ Docker Compose Generator — styles+ Uses Docusaurus / Infima CSS variables for theme compatibility.+ =================================================================== */++.generator {+ margin: 2rem 0;+}++.card {+ background: var(--ifm-background-surface-color);+ border: 1px solid var(--ifm-color-emphasis-400);+ border-radius: 12px;+ padding: 2rem;+ box-shadow: var(--ifm-global-shadow-lw);+}++[data-theme="light"] .card {+ background: var(--ifm-color-emphasis-100);+ border: 1px solid var(--ifm-color-emphasis-300);+}++/* --- Form sections --- */++.formSection {+ margin-bottom: 1.5rem;+ padding-bottom: 1.5rem;+ border-bottom: 1px solid var(--ifm-color-emphasis-400);+}++.formSection:last-child {+ border-bottom: none;+ margin-bottom: 0;+ padding-bottom: 0;+}++.formSection h4 {+ margin: 0 0 1rem 0;+ color: var(--ifm-font-color-base);+ font-size: 1.1rem;+ font-weight: var(--ifm-font-weight-semibold);+}++/* --- Form controls --- */++.formGroup {+ margin-bottom: 1rem;+}++.formGroup:last-child {+ margin-bottom: 0;+}++.label {+ display: block;+ margin-bottom: 0.25rem;+ color: var(--ifm-font-color-base);+ font-weight: var(--ifm-font-weight-semibold);+ font-size: 0.9rem;+}++.input {+ width: 100%;+ padding: 0.5rem 0.75rem;+ border: 1px solid var(--ifm-color-emphasis-400);+ border-radius: 6px;+ background: var(--ifm-background-color);+ color: var(--ifm-font-color-base);+ font-size: 0.95rem;+ transition: border-color 0.2s, box-shadow 0.2s;+}++[data-theme="light"] .input {+ background: #fff;+ border: 1px solid #d0d7de;+}++.input:focus {+ outline: none;+ border-color: var(--ifm-color-primary);+ box-shadow: 0 0 0 3px var(--ifm-color-primary-lightest);+}++[data-theme="dark"] .input {+ border-color: var(--ifm-color-emphasis-300);+}++.inputError {+ border-color: #e74c3c;+ animation: shake 0.3s ease-in-out;+}++@keyframes shake {+ 0%,+ 100% {+ transform: translateX(0);+ }+ 25% {+ transform: translateX(-5px);+ }+ 75% {+ transform: translateX(5px);+ }+}++/* --- Select dropdown --- */++.select {+ cursor: pointer;+ appearance: none;+ -moz-appearance: none;+ -webkit-appearance: none;+ background: var(--ifm-background-color)+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E")+ no-repeat right 0.75rem center / 12px 12px;+ padding-right: 2rem;+}++[data-theme="light"] .select {+ background: #fff+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E")+ no-repeat right 0.75rem center / 12px 12px;+}++.helpText {+ margin: 0.5rem 0 0 0;+ font-size: 0.85rem;+ color: var(--ifm-font-color-secondary);+ line-height: 1.5;+}++.helpText a {+ color: var(--ifm-color-primary);+}++/* --- Device grid --- */++.deviceGrid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));+ gap: 0.75rem;+ margin-top: 0.5rem;+}++.deviceCard {+ padding: 0.75rem;+ border: 2px solid var(--ifm-color-emphasis-400);+ border-radius: 12px;+ cursor: pointer;+ transition: all 0.2s;+ text-align: center;+ background: var(--ifm-background-color);+ display: flex;+ flex-direction: column;+ align-items: center;+}++[data-theme="light"] .deviceCard {+ border: 2px solid #d0d7de;+ background: #fff;+}++.deviceCard:hover {+ border-color: var(--ifm-color-primary);+ background: var(--ifm-color-emphasis-100);+ transform: translateY(-2px);+}++.deviceCardActive {+ border-color: var(--ifm-color-primary);+ background: var(--ifm-color-primary-lightest);+ box-shadow: 0 0 0 1px var(--ifm-color-primary);+}++[data-theme="light"] .deviceCardActive {+ background: color-mix(in srgb, var(--ifm-color-primary) 12%, #fff);+}++[data-theme="dark"] .deviceCardActive {+ background: color-mix(in srgb, var(--ifm-color-primary) 25%, #1b1b1b);+}++[data-theme="dark"] .deviceCardActive .deviceName {+ color: var(--ifm-color-primary-light);+}++[data-theme="dark"] .deviceCardActive .deviceDesc {+ color: var(--ifm-color-primary-light);+ opacity: 0.85;+}++.deviceIcon {+ font-size: 2rem;+ margin-bottom: 0.25rem;+ height: 40px;+ width: 50px;+ display: flex;+ align-items: center;+ justify-content: center;+}++.deviceIconSvg {+ margin-bottom: 0.25rem;+ height: 40px;+ width: 50px;+ display: flex;+ align-items: center;+ justify-content: center;+ overflow: visible;+ /* Allow iconStyle width/height to override */+ flex-shrink: 0;+}++.deviceIconSvg svg {+ width: var(--svg-width, 100%);+ height: var(--svg-height, 100%);+ fill: var(--svg-fill, currentColor);+ transform: var(--svg-transform, none);+}++.deviceIconImage {+ margin-bottom: 0.25rem;+ height: 40px;+ width: 50px;+ display: flex;+ align-items: center;+ justify-content: center;+}++.deviceIconImage img {+ max-width: 100%;+ max-height: 100%;+ object-fit: contain;+}++.deviceName {+ font-weight: var(--ifm-font-weight-semibold);+ color: var(--ifm-font-color-base);+ margin-bottom: 0.15rem;+ font-size: 0.9rem;+}++.deviceDesc {+ font-size: 0.75rem;+ color: var(--ifm-font-color-secondary);+ line-height: 1.3;+}++/* --- Checkbox grid --- */++.checkboxGrid {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 0.5rem;+}++@media (max-width: 576px) {+ .checkboxGrid {+ grid-template-columns: 1fr;+ }+}++.hardwareItem {+ margin-bottom: 0;+}++.hardwareDescription {+ margin: 0.15rem 0 0.4rem 1.6rem;+ font-size: 0.8rem;+ color: var(--ifm-font-color-secondary);+ line-height: 1.5;+}++.hardwareDescription a {+ color: var(--ifm-color-primary);+ text-decoration: underline;+ text-underline-offset: 2px;+}++.checkboxLabel {+ display: flex;+ align-items: center;+ gap: 0.5rem;+ cursor: pointer;+ padding: 0.4rem 0.5rem;+ border-radius: 6px;+ transition: background-color 0.2s;+ font-size: 0.9rem;+}++.checkboxLabel:hover {+ background: var(--ifm-color-emphasis-100);+}++.checkboxLabel input[type="checkbox"] {+ width: 1.1rem;+ height: 1.1rem;+ cursor: pointer;+ flex-shrink: 0;+}++.checkboxLabel span {+ color: var(--ifm-font-color-base);+}++.checkboxDisabled {+ cursor: not-allowed;+}++.checkboxDisabled:hover {+ background: transparent;+}++.checkboxDisabled input[type="checkbox"] {+ cursor: not-allowed;+ opacity: 0.5;+}++/* --- Form grid (side-by-side) --- */++.formGrid {+ display: grid;+ grid-template-columns: repeat(2, 1fr);+ gap: 1rem;+}++@media (max-width: 576px) {+ .formGrid {+ grid-template-columns: 1fr;+ }+}++.formGrid .formGroup {+ margin-bottom: 0;+}++/* --- Port section --- */++.portSection {+ margin-bottom: 0.75rem;+}++.warningBadge {+ margin-left: auto;+ color: #e67e22;+ font-size: 0.85rem;+}++/* --- NVIDIA config --- */++.nvidiaConfig {+ margin-top: 1rem;+ margin-bottom: 1.5rem;+ padding: 1rem;+ background: var(--ifm-background-color);+ border-radius: 8px;+ border-left: 3px solid var(--ifm-color-primary);+}++[data-theme="light"] .nvidiaConfig {+ background: #f6f8fa;+ border-left: 3px solid var(--ifm-color-primary);+}++/* --- Result section --- */++.resultSection {+ margin-top: 2rem;+}++.resultHeader {+ display: flex;+ justify-content: space-between;+ align-items: center;+ margin-bottom: 1rem;+}++.resultHeader h4 {+ margin: 0;+ color: var(--ifm-font-color-base);+}