container-superposition 0.1.6 → 0.1.8
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/README.md +24 -15
- package/dist/scripts/init.js +1 -1534
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/cli/args.d.ts +20 -0
- package/dist/tool/cli/args.d.ts.map +1 -0
- package/dist/tool/cli/args.js +325 -0
- package/dist/tool/cli/args.js.map +1 -0
- package/dist/tool/cli/run.d.ts +2 -0
- package/dist/tool/cli/run.d.ts.map +1 -0
- package/dist/tool/cli/run.js +318 -0
- package/dist/tool/cli/run.js.map +1 -0
- package/dist/tool/commands/adopt.d.ts.map +1 -1
- package/dist/tool/commands/adopt.js +1 -27
- package/dist/tool/commands/adopt.js.map +1 -1
- package/dist/tool/commands/doctor.d.ts +3 -0
- package/dist/tool/commands/doctor.d.ts.map +1 -1
- package/dist/tool/commands/doctor.js +1068 -70
- package/dist/tool/commands/doctor.js.map +1 -1
- package/dist/tool/commands/explain.d.ts.map +1 -1
- package/dist/tool/commands/explain.js +18 -0
- package/dist/tool/commands/explain.js.map +1 -1
- package/dist/tool/commands/migrate.d.ts +7 -0
- package/dist/tool/commands/migrate.d.ts.map +1 -0
- package/dist/tool/commands/migrate.js +52 -0
- package/dist/tool/commands/migrate.js.map +1 -0
- package/dist/tool/questionnaire/answers.d.ts +16 -0
- package/dist/tool/questionnaire/answers.d.ts.map +1 -0
- package/dist/tool/questionnaire/answers.js +102 -0
- package/dist/tool/questionnaire/answers.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +3 -3
- package/dist/tool/questionnaire/composer.d.ts.map +1 -1
- package/dist/tool/questionnaire/composer.js +902 -37
- package/dist/tool/questionnaire/composer.js.map +1 -1
- package/dist/tool/questionnaire/presets.d.ts +60 -0
- package/dist/tool/questionnaire/presets.d.ts.map +1 -0
- package/dist/tool/questionnaire/presets.js +164 -0
- package/dist/tool/questionnaire/presets.js.map +1 -0
- package/dist/tool/questionnaire/questionnaire.d.ts +10 -0
- package/dist/tool/questionnaire/questionnaire.d.ts.map +1 -0
- package/dist/tool/questionnaire/questionnaire.js +580 -0
- package/dist/tool/questionnaire/questionnaire.js.map +1 -0
- package/dist/tool/schema/manifest-migrations.d.ts +5 -0
- package/dist/tool/schema/manifest-migrations.d.ts.map +1 -1
- package/dist/tool/schema/manifest-migrations.js +45 -0
- package/dist/tool/schema/manifest-migrations.js.map +1 -1
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -1
- package/dist/tool/schema/overlay-loader.js +25 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +14 -2
- package/dist/tool/schema/project-config.d.ts.map +1 -1
- package/dist/tool/schema/project-config.js +277 -34
- package/dist/tool/schema/project-config.js.map +1 -1
- package/dist/tool/schema/target-rules.d.ts +78 -0
- package/dist/tool/schema/target-rules.d.ts.map +1 -0
- package/dist/tool/schema/target-rules.js +367 -0
- package/dist/tool/schema/target-rules.js.map +1 -0
- package/dist/tool/schema/types.d.ts +123 -12
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/merge.d.ts.map +1 -1
- package/dist/tool/utils/merge.js +9 -0
- package/dist/tool/utils/merge.js.map +1 -1
- package/dist/tool/utils/parameters.d.ts +76 -0
- package/dist/tool/utils/parameters.d.ts.map +1 -0
- package/dist/tool/utils/parameters.js +125 -0
- package/dist/tool/utils/parameters.js.map +1 -0
- package/dist/tool/utils/paths.d.ts +2 -0
- package/dist/tool/utils/paths.d.ts.map +1 -0
- package/dist/tool/utils/paths.js +31 -0
- package/dist/tool/utils/paths.js.map +1 -0
- package/docs/creating-overlays.md +151 -2
- package/docs/deployment-targets.md +88 -56
- package/docs/examples.md +20 -17
- package/docs/filesystem-contract.md +5 -0
- package/docs/minimal-and-editor.md +65 -5
- package/docs/overlay-imports.md +202 -101
- package/docs/overlays.md +162 -34
- package/docs/quick-reference.md +99 -0
- package/docs/specs/003-mkdocs2-overlay/spec.md +114 -0
- package/docs/specs/004-doctor-fix/spec.md +70 -0
- package/docs/specs/005-cuda-overlay/spec.md +101 -0
- package/docs/specs/006-rocm-overlay/spec.md +109 -0
- package/docs/specs/007-init-project-file/spec.md +66 -0
- package/docs/specs/007-target-aware-generation/spec.md +126 -0
- package/docs/specs/008-project-file-canonical/spec.md +83 -0
- package/docs/specs/009-project-env/spec.md +147 -0
- package/docs/specs/010-compose-env-materialization/spec.md +130 -0
- package/docs/specs/011-overlay-parameters/spec.md +235 -0
- package/overlays/.shared/README.md +105 -21
- package/overlays/.shared/compose/common-healthchecks.md +60 -0
- package/overlays/.shared/compose/nvidia-gpu-devcontainer.yml +22 -0
- package/overlays/.shared/vscode/recommended-extensions.json +15 -11
- package/overlays/alertmanager/setup.sh +4 -19
- package/overlays/alertmanager/verify.sh +8 -9
- package/overlays/all/README.md +43 -0
- package/overlays/all/devcontainer.patch.json +6 -0
- package/overlays/all/overlay.yml +14 -0
- package/overlays/amp/setup.sh +5 -0
- package/overlays/bun/setup.sh +10 -1
- package/overlays/bun/verify.sh +6 -1
- package/overlays/claude-code/setup.sh +5 -0
- package/overlays/cloudflared/setup.sh +9 -12
- package/overlays/codex/README.md +9 -6
- package/overlays/codex/devcontainer.patch.json +7 -1
- package/overlays/codex/setup.sh +5 -0
- package/overlays/codex/verify.sh +8 -0
- package/overlays/comfyui/.env.example +34 -0
- package/overlays/comfyui/README.md +342 -0
- package/overlays/comfyui/devcontainer.patch.json +15 -0
- package/overlays/comfyui/docker-compose.yml +39 -0
- package/overlays/comfyui/overlay.yml +20 -0
- package/overlays/comfyui/setup.sh +36 -0
- package/overlays/comfyui/verify.sh +103 -0
- package/overlays/commitlint/setup.sh +5 -0
- package/overlays/cuda/README.md +179 -0
- package/overlays/cuda/devcontainer.patch.json +7 -0
- package/overlays/cuda/overlay.yml +17 -0
- package/overlays/cuda/setup.sh +32 -0
- package/overlays/cuda/verify.sh +38 -0
- package/overlays/devcontainer-cli/README.md +50 -0
- package/overlays/devcontainer-cli/devcontainer.patch.json +13 -0
- package/overlays/devcontainer-cli/overlay.yml +16 -0
- package/overlays/devcontainer-cli/setup.sh +14 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/setup.sh +7 -6
- package/overlays/dotnet/setup.sh +14 -7
- package/overlays/duckdb/devcontainer.patch.json +1 -2
- package/overlays/gcloud/devcontainer.patch.json +0 -6
- package/overlays/gcloud/setup.sh +51 -0
- package/overlays/gemini-cli/setup.sh +5 -0
- package/overlays/git-helpers/devcontainer.patch.json +2 -1
- package/overlays/go/setup.sh +15 -14
- package/overlays/jaeger/overlay.yml +2 -0
- package/overlays/just/setup.sh +5 -17
- package/overlays/k3d/README.md +201 -0
- package/overlays/k3d/devcontainer.patch.json +9 -0
- package/overlays/k3d/overlay.yml +19 -0
- package/overlays/k3d/setup.sh +34 -0
- package/overlays/k3d/verify.sh +38 -0
- package/overlays/keycloak/docker-compose.yml +6 -4
- package/overlays/keycloak/verify.sh +4 -3
- package/overlays/kind/devcontainer.patch.json +1 -2
- package/overlays/kind/setup.sh +8 -17
- package/overlays/minio/setup.sh +10 -18
- package/overlays/mkdocs/overlay.yml +2 -1
- package/overlays/mkdocs2/README.md +135 -0
- package/overlays/mkdocs2/devcontainer.patch.json +19 -0
- package/overlays/mkdocs2/overlay.yml +17 -0
- package/overlays/mkdocs2/setup.sh +67 -0
- package/overlays/mkdocs2/verify.sh +35 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +7 -1
- package/overlays/modern-cli-tools/setup.sh +21 -71
- package/overlays/mongodb/devcontainer.patch.json +0 -6
- package/overlays/mongodb/setup.sh +59 -0
- package/overlays/mysql/verify.sh +4 -3
- package/overlays/nats/.env.example +1 -1
- package/overlays/nats/README.md +1 -1
- package/overlays/nats/docker-compose.yml +1 -1
- package/overlays/ngrok/setup.sh +9 -6
- package/overlays/nodejs/setup.sh +5 -0
- package/overlays/ollama/.env.example +14 -0
- package/overlays/ollama/README.md +325 -0
- package/overlays/ollama/devcontainer.patch.json +14 -0
- package/overlays/ollama/docker-compose.yml +24 -0
- package/overlays/ollama/overlay.yml +22 -0
- package/overlays/ollama/setup.sh +106 -0
- package/overlays/ollama/verify.sh +99 -0
- package/overlays/open-webui/.env.example +5 -0
- package/overlays/open-webui/README.md +162 -0
- package/overlays/open-webui/devcontainer.patch.json +14 -0
- package/overlays/open-webui/docker-compose.yml +23 -0
- package/overlays/open-webui/overlay.yml +38 -0
- package/overlays/openapi-tools/devcontainer.patch.json +1 -2
- package/overlays/openapi-tools/setup.sh +9 -8
- package/overlays/opencode/setup.sh +5 -0
- package/overlays/otel-collector/overlay.yml +2 -0
- package/overlays/otel-collector/setup.sh +3 -16
- package/overlays/otel-demo-nodejs/verify.sh +8 -9
- package/overlays/otel-demo-python/verify.sh +16 -10
- package/overlays/pandoc/README.md +22 -15
- package/overlays/pandoc/devcontainer.patch.json +6 -2
- package/overlays/pandoc/setup.sh +217 -18
- package/overlays/pandoc/verify.sh +16 -4
- package/overlays/pgvector/.env.example +6 -0
- package/overlays/pgvector/README.md +215 -0
- package/overlays/pgvector/devcontainer.patch.json +23 -0
- package/overlays/pgvector/docker-compose.yml +32 -0
- package/overlays/pgvector/overlay.yml +44 -0
- package/overlays/playwright/devcontainer.patch.json +3 -1
- package/overlays/playwright/setup.sh +37 -0
- package/overlays/postgres/.env.example +5 -5
- package/overlays/postgres/devcontainer.patch.json +4 -4
- package/overlays/postgres/docker-compose.yml +15 -5
- package/overlays/postgres/overlay.yml +19 -1
- package/overlays/powershell/setup.sh +49 -13
- package/overlays/pre-commit/setup.sh +12 -3
- package/overlays/prometheus/overlay.yml +2 -0
- package/overlays/promtail/verify.sh +16 -10
- package/overlays/pulumi/devcontainer.patch.json +1 -1
- package/overlays/python/setup.sh +28 -9
- package/overlays/python/verify.sh +4 -2
- package/overlays/qdrant/.env.example +4 -0
- package/overlays/qdrant/README.md +216 -0
- package/overlays/qdrant/devcontainer.patch.json +20 -0
- package/overlays/qdrant/docker-compose.yml +25 -0
- package/overlays/qdrant/overlay.yml +40 -0
- package/overlays/redpanda/docker-compose.yml +3 -5
- package/overlays/rocm/README.md +227 -0
- package/overlays/rocm/devcontainer.patch.json +4 -0
- package/overlays/rocm/overlay.yml +17 -0
- package/overlays/rocm/setup.sh +45 -0
- package/overlays/rocm/verify.sh +47 -0
- package/overlays/rust/setup.sh +11 -18
- package/overlays/skaffold/README.md +256 -0
- package/overlays/skaffold/devcontainer.patch.json +9 -0
- package/overlays/skaffold/overlay.yml +20 -0
- package/overlays/skaffold/setup.sh +33 -0
- package/overlays/skaffold/verify.sh +24 -0
- package/overlays/spec-kit/setup.sh +7 -3
- package/overlays/sqlite/setup.sh +14 -14
- package/overlays/sqlserver/docker-compose.yml +3 -3
- package/overlays/sqlserver/verify.sh +22 -5
- package/overlays/tempo/verify.sh +16 -10
- package/overlays/tilt/devcontainer.patch.json +1 -2
- package/overlays/tilt/setup.sh +14 -4
- package/overlays/windsurf-cli/setup.sh +27 -4
- package/overlays/windsurf-cli/verify.sh +13 -3
- package/package.json +4 -2
- package/templates/scripts/setup-utils.sh +228 -0
- package/tool/schema/config.schema.json +141 -9
- package/tool/schema/overlay-manifest.schema.json +38 -0
- package/overlays/.shared/compose/common-healthchecks.yml +0 -38
- /package/overlays/otel-demo-nodejs/{Dockerfile-otel-demo-nodejs → Dockerfile} +0 -0
- /package/overlays/otel-demo-nodejs/{package-otel-demo-nodejs.json → package.json} +0 -0
- /package/overlays/otel-demo-nodejs/{server-otel-demo-nodejs.js → server.js} +0 -0
- /package/overlays/otel-demo-nodejs/{tracing-otel-demo-nodejs.js → tracing.js} +0 -0
- /package/overlays/otel-demo-python/{Dockerfile-otel-demo-python → Dockerfile} +0 -0
- /package/overlays/otel-demo-python/{app-otel-demo-python.py → app.py} +0 -0
- /package/overlays/otel-demo-python/{requirements-otel-demo-python.txt → requirements.txt} +0 -0
|
@@ -6,19 +6,18 @@ echo "🔍 Verifying Alertmanager installation..."
|
|
|
6
6
|
# Track overall success
|
|
7
7
|
ALL_CHECKS_PASSED=true
|
|
8
8
|
|
|
9
|
-
# Check if Alertmanager
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
# Check if Alertmanager API is accessible (primary health signal).
|
|
10
|
+
# docker ps is used for info only — it may not be accessible in all setups.
|
|
11
|
+
if curl -s -o /dev/null -w "%{http_code}" http://alertmanager:9093/-/healthy 2>/dev/null | grep -q "200"; then
|
|
12
|
+
echo "✓ Alertmanager API is accessible"
|
|
12
13
|
else
|
|
13
|
-
echo "✗ Alertmanager
|
|
14
|
+
echo "✗ Alertmanager API not responding (http://alertmanager:9093/-/healthy)"
|
|
14
15
|
ALL_CHECKS_PASSED=false
|
|
15
16
|
fi
|
|
16
17
|
|
|
17
|
-
#
|
|
18
|
-
if
|
|
19
|
-
echo "✓ Alertmanager
|
|
20
|
-
else
|
|
21
|
-
echo "⚠️ Alertmanager API not responding yet (may still be starting)"
|
|
18
|
+
# Informational: check via docker ps if available.
|
|
19
|
+
if docker ps --format '{{.Names}}' 2>/dev/null | grep -q alertmanager; then
|
|
20
|
+
echo "✓ Alertmanager container visible in docker ps"
|
|
22
21
|
fi
|
|
23
22
|
|
|
24
23
|
# Final result
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Meta Overlay
|
|
2
|
+
|
|
3
|
+
Internal testing overlay that activates **all available overlays** at once. Used to verify that the full overlay catalogue can be composed without errors.
|
|
4
|
+
|
|
5
|
+
> **Not shown in the interactive questionnaire.** Use it directly in a `superposition.yml` or test script.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
The `all` overlay exists to make CI/integration testing straightforward: selecting it expands to every non-preset, non-hidden overlay in the live registry, exercising the full composition pipeline in one pass.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
# superposition.yml
|
|
13
|
+
stack: compose
|
|
14
|
+
containerName: meta-test
|
|
15
|
+
overlays:
|
|
16
|
+
- all
|
|
17
|
+
outputPath: .devcontainer
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## How expansion works
|
|
21
|
+
|
|
22
|
+
There is no `requires` list in `overlays/all/overlay.yml`. Instead, the dependency resolver in
|
|
23
|
+
`resolveDependencies()` detects the special `all` overlay ID and replaces it with the full live
|
|
24
|
+
overlay registry (excluding hidden and preset overlays) at resolution time. This means:
|
|
25
|
+
|
|
26
|
+
- New overlays are automatically included the moment they are added to the catalogue — no manual
|
|
27
|
+
update to this file is needed.
|
|
28
|
+
- The expansion is driven by the live registry, not a hard-coded list.
|
|
29
|
+
|
|
30
|
+
## Conflicts
|
|
31
|
+
|
|
32
|
+
Some overlays expanded from `all` are mutually exclusive at runtime:
|
|
33
|
+
|
|
34
|
+
| Conflict | Details |
|
|
35
|
+
| ---------------------------------- | ------------------------------------------------------- |
|
|
36
|
+
| `docker-in-docker` ↔ `docker-sock` | Two different Docker access strategies — cannot coexist |
|
|
37
|
+
|
|
38
|
+
The composer will emit warnings for these conflicts. They are expected and do not block the build. The intent is to test patch composition, not to produce a runnable container.
|
|
39
|
+
|
|
40
|
+
## References
|
|
41
|
+
|
|
42
|
+
- [Overlay authoring guide](../../docs/creating-overlays.md)
|
|
43
|
+
- [All overlays](../../docs/overlays.md)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: all
|
|
2
|
+
name: All Overlays
|
|
3
|
+
description: Internal testing overlay that activates all available overlays to verify the full build
|
|
4
|
+
category: dev
|
|
5
|
+
hidden: true
|
|
6
|
+
supports: []
|
|
7
|
+
requires: []
|
|
8
|
+
suggests: []
|
|
9
|
+
conflicts: []
|
|
10
|
+
tags:
|
|
11
|
+
- internal
|
|
12
|
+
- testing
|
|
13
|
+
- all
|
|
14
|
+
ports: []
|
package/overlays/amp/setup.sh
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides load_nvm)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
load_nvm
|
|
10
|
+
|
|
6
11
|
echo "📦 Installing Sourcegraph Amp CLI..."
|
|
7
12
|
|
|
8
13
|
# Install @sourcegraph/amp globally
|
package/overlays/bun/setup.sh
CHANGED
|
@@ -34,7 +34,7 @@ if ! command -v bun &> /dev/null; then
|
|
|
34
34
|
BUN_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-${BUN_ARCH}.zip"
|
|
35
35
|
|
|
36
36
|
echo " Downloading Bun version ${BUN_VERSION} for ${ARCH}..."
|
|
37
|
-
if ! wget "${BUN_URL}" -O /tmp/bun.zip
|
|
37
|
+
if ! wget -q "${BUN_URL}" -O /tmp/bun.zip; then
|
|
38
38
|
echo " ❌ Failed to download Bun from ${BUN_URL}"
|
|
39
39
|
exit 1
|
|
40
40
|
fi
|
|
@@ -61,6 +61,15 @@ fi
|
|
|
61
61
|
export BUN_INSTALL="$HOME/.bun"
|
|
62
62
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
63
63
|
|
|
64
|
+
# Persist PATH so verify script (and interactive shells) can find bun
|
|
65
|
+
for _shell_rc in "$HOME/.bashrc" "$HOME/.profile"; do
|
|
66
|
+
if [ -f "$_shell_rc" ] && ! grep -q 'BUN_INSTALL' "$_shell_rc" 2>/dev/null; then
|
|
67
|
+
echo 'export BUN_INSTALL="$HOME/.bun"' >> "$_shell_rc"
|
|
68
|
+
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> "$_shell_rc"
|
|
69
|
+
fi
|
|
70
|
+
done
|
|
71
|
+
unset _shell_rc
|
|
72
|
+
|
|
64
73
|
# Verify installation
|
|
65
74
|
if command -v bun &> /dev/null; then
|
|
66
75
|
INSTALLED_VERSION=$(bun --version)
|
package/overlays/bun/verify.sh
CHANGED
|
@@ -7,10 +7,15 @@ echo "🔍 Verifying Bun overlay..."
|
|
|
7
7
|
echo ""
|
|
8
8
|
|
|
9
9
|
# Check Bun is installed
|
|
10
|
+
# The verify script runs in a non-interactive shell that may not have ~/.bun/bin on PATH.
|
|
10
11
|
echo "1️⃣ Checking Bun..."
|
|
11
|
-
|
|
12
|
+
BUN_BIN="${BUN_INSTALL:-$HOME/.bun}/bin/bun"
|
|
13
|
+
if command -v bun &>/dev/null; then
|
|
12
14
|
bun --version
|
|
13
15
|
echo " ✅ Bun found"
|
|
16
|
+
elif [ -x "$BUN_BIN" ]; then
|
|
17
|
+
"$BUN_BIN" --version
|
|
18
|
+
echo " ✅ Bun found (at $BUN_BIN)"
|
|
14
19
|
else
|
|
15
20
|
echo " ❌ Bun not found"
|
|
16
21
|
exit 1
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
+
# Source shared setup utilities (provides load_nvm)
|
|
7
|
+
# shellcheck source=setup-utils.sh
|
|
8
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
9
|
+
load_nvm
|
|
10
|
+
|
|
6
11
|
echo "📦 Installing Anthropic Claude Code CLI..."
|
|
7
12
|
|
|
8
13
|
# Install @anthropic-ai/claude-code globally
|
|
@@ -13,18 +13,15 @@ echo "📦 Installing cloudflared..."
|
|
|
13
13
|
# Check https://github.com/cloudflare/cloudflared/releases for newer versions
|
|
14
14
|
CF_VERSION="${CLOUDFLARED_VERSION:-2025.2.1}"
|
|
15
15
|
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
curl -sSL "$CF_URL" -o /tmp/cloudflared
|
|
26
|
-
sudo install -m 755 /tmp/cloudflared /usr/local/bin/cloudflared
|
|
27
|
-
rm -f /tmp/cloudflared
|
|
16
|
+
# Source shared setup utilities
|
|
17
|
+
# shellcheck source=setup-utils.sh
|
|
18
|
+
source "$(dirname "${BASH_SOURCE[0]}")/setup-utils.sh"
|
|
19
|
+
|
|
20
|
+
detect_arch amd64
|
|
21
|
+
|
|
22
|
+
install_binary \
|
|
23
|
+
"https://github.com/cloudflare/cloudflared/releases/download/${CF_VERSION}/cloudflared-linux-${CS_ARCH}" \
|
|
24
|
+
"cloudflared" "755"
|
|
28
25
|
|
|
29
26
|
# Verify installation
|
|
30
27
|
if command -v cloudflared &> /dev/null; then
|
package/overlays/codex/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Adds OpenAI Codex CLI with a persistent `.codex` folder for configurations.
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **OpenAI Codex CLI** - AI-powered code generation and assistance from the command line
|
|
8
|
+
- **Bubblewrap** - Linux sandbox dependency installed as `bwrap` for Codex
|
|
8
9
|
- **Codex directory** - Creates `$HOME/.codex` for persistent configurations
|
|
9
10
|
|
|
10
11
|
## What is OpenAI Codex CLI?
|
|
@@ -26,8 +27,9 @@ The OpenAI Codex CLI (`@openai/codex`) provides command-line access to OpenAI's
|
|
|
26
27
|
|
|
27
28
|
This overlay:
|
|
28
29
|
|
|
29
|
-
1. Installs
|
|
30
|
-
2.
|
|
30
|
+
1. Installs the Linux `bubblewrap` package so `bwrap` is available for Codex sandboxing
|
|
31
|
+
2. Installs OpenAI Codex CLI globally via npm (`npm install -g @openai/codex`)
|
|
32
|
+
3. Creates the `$HOME/.codex` directory for persistent configurations
|
|
31
33
|
|
|
32
34
|
**After setup:**
|
|
33
35
|
|
|
@@ -39,12 +41,13 @@ This overlay:
|
|
|
39
41
|
After setup, run the verification script to ensure proper installation:
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
bash .devcontainer/verify-codex.sh
|
|
44
|
+
bash .devcontainer/scripts/verify-codex.sh
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
This will check:
|
|
46
48
|
|
|
47
49
|
- Codex CLI is installed and in PATH
|
|
50
|
+
- `bwrap` is installed and in PATH
|
|
48
51
|
- `.codex` directory exists
|
|
49
52
|
|
|
50
53
|
## Troubleshooting
|
|
@@ -90,7 +93,7 @@ codex explain "what does this regex do: /^[a-zA-Z0-9]+$/"
|
|
|
90
93
|
codex complete "function fibonacci(n) {"
|
|
91
94
|
```
|
|
92
95
|
|
|
93
|
-
For full documentation, visit: [OpenAI Codex CLI Documentation](https://github.com/openai/
|
|
96
|
+
For full documentation, visit: [OpenAI Codex CLI Documentation](https://github.com/openai/codex)
|
|
94
97
|
|
|
95
98
|
## Optional: Persistent .codex Mount
|
|
96
99
|
|
|
@@ -104,7 +107,7 @@ Then add this mount to your `devcontainer.json`:
|
|
|
104
107
|
|
|
105
108
|
```json
|
|
106
109
|
"mounts": [
|
|
107
|
-
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.codex,target
|
|
110
|
+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.codex,target=/home/vscode/.codex,type=bind,consistency=cached"
|
|
108
111
|
]
|
|
109
112
|
```
|
|
110
113
|
|
|
@@ -124,5 +127,5 @@ This allows you to:
|
|
|
124
127
|
|
|
125
128
|
## Additional Resources
|
|
126
129
|
|
|
127
|
-
- [OpenAI Codex CLI](https://github.com/openai/
|
|
130
|
+
- [OpenAI Codex CLI](https://github.com/openai/codex)
|
|
128
131
|
- [OpenAI Platform](https://platform.openai.com/)
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json"
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"./features/cross-distro-packages": {
|
|
5
|
+
"apt": "bubblewrap",
|
|
6
|
+
"apk": "bubblewrap"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
3
9
|
}
|
package/overlays/codex/setup.sh
CHANGED
package/overlays/codex/verify.sh
CHANGED
|
@@ -5,6 +5,14 @@ set -e
|
|
|
5
5
|
|
|
6
6
|
echo "🔍 Verifying Codex overlay setup..."
|
|
7
7
|
|
|
8
|
+
# Check if bubblewrap is installed for Codex sandboxing on Linux
|
|
9
|
+
if ! command -v bwrap &> /dev/null; then
|
|
10
|
+
echo "✗ bubblewrap is not installed or not in PATH"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo "✓ bubblewrap is installed: $(bwrap --version 2>/dev/null | head -n 1 || echo 'installed')"
|
|
15
|
+
|
|
8
16
|
# Check if codex CLI is installed
|
|
9
17
|
if ! command -v codex &> /dev/null; then
|
|
10
18
|
echo "✗ codex CLI is not installed or not in PATH"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ComfyUI Configuration
|
|
2
|
+
|
|
3
|
+
# ComfyUI models storage strategy:
|
|
4
|
+
#
|
|
5
|
+
# Option A (default) — named Docker volume (no host path needed):
|
|
6
|
+
# Leave COMFYUI_MODELS_HOST_PATH unset. Models persist in the Docker volume
|
|
7
|
+
# named "comfyui-models" and are shared between devcontainer and ComfyUI.
|
|
8
|
+
#
|
|
9
|
+
# Option B — bind mount to host directory (also accessible from host tools):
|
|
10
|
+
# Set COMFYUI_MODELS_HOST_PATH to an absolute host path.
|
|
11
|
+
# Docker creates the directory if it does not exist.
|
|
12
|
+
# Note: Docker Compose does not expand '~' in .env files; always use full absolute paths.
|
|
13
|
+
# macOS/Linux examples:
|
|
14
|
+
# COMFYUI_MODELS_HOST_PATH=/home/you/.cache/comfyui/models
|
|
15
|
+
# COMFYUI_MODELS_HOST_PATH=/home/you/ComfyUI/models
|
|
16
|
+
# Windows (Docker Desktop — use absolute path, no tilde):
|
|
17
|
+
# COMFYUI_MODELS_HOST_PATH=C:/Users/you/.cache/comfyui/models
|
|
18
|
+
#
|
|
19
|
+
# COMFYUI_MODELS_HOST_PATH=
|
|
20
|
+
|
|
21
|
+
# Where ComfyUI-generated images/videos are saved.
|
|
22
|
+
# Leave unset to use the named Docker volume "comfyui-output" (default),
|
|
23
|
+
# or set to an absolute host path to save outputs to the host filesystem.
|
|
24
|
+
# COMFYUI_OUTPUT_PATH=
|
|
25
|
+
|
|
26
|
+
# ComfyUI Docker image tag. Use 'latest-cuda' for NVIDIA GPU, 'latest-rocm' for AMD/ROCm, or 'latest-cpu' for CPU-only.
|
|
27
|
+
COMFYUI_VERSION=latest-cuda
|
|
28
|
+
|
|
29
|
+
# Host port for the ComfyUI web UI. Default: 8188.
|
|
30
|
+
COMFYUI_PORT=8188
|
|
31
|
+
|
|
32
|
+
# Extra CLI arguments passed to ComfyUI at startup.
|
|
33
|
+
# --listen 0.0.0.0 is required to accept connections from outside the container.
|
|
34
|
+
CLI_ARGS=--listen 0.0.0.0
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# ComfyUI Overlay
|
|
2
|
+
|
|
3
|
+
Runs [ComfyUI](https://github.com/comfyanonymous/ComfyUI) as a Docker Compose service, providing a reproducible, containerised node-based image and video generation environment with a shared models directory accessible from both the devcontainer and the ComfyUI sidecar.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Node-based workflow UI** — Visual node editor for building Stable Diffusion and generative AI pipelines, accessible at `http://localhost:8188`
|
|
8
|
+
- **REST and WebSocket API** — Programmatically submit workflows and receive results via ComfyUI's built-in API
|
|
9
|
+
- **Custom node support** — Install community custom nodes to extend workflows with new models and operations
|
|
10
|
+
- **Shared models directory** — Single volume root (`/opt/comfyui-models`) mounted into both the devcontainer and the ComfyUI sidecar; model files are accessible by scripts running in the devcontainer without going through the HTTP API
|
|
11
|
+
- **Output persistence** — Generated images and videos are saved to a named volume (or host path) so they survive container restarts
|
|
12
|
+
- **Port 8188** — Standard ComfyUI web UI port, auto-forwarded and opened in the browser
|
|
13
|
+
|
|
14
|
+
## How It Works
|
|
15
|
+
|
|
16
|
+
ComfyUI runs as a long-lived Docker Compose service (`comfyui`) alongside your devcontainer. The devcontainer reaches it via the hostname `comfyui` on port `8188`.
|
|
17
|
+
|
|
18
|
+
**Service configuration:**
|
|
19
|
+
|
|
20
|
+
- Image: `ghcr.io/ai-dock/comfyui:latest-cuda` (configurable via `COMFYUI_VERSION`)
|
|
21
|
+
- Network: `devnet` (shared with the dev container)
|
|
22
|
+
- Port: `8188` (ComfyUI web UI and REST API)
|
|
23
|
+
- Volumes: single models root shared between devcontainer and ComfyUI sidecar
|
|
24
|
+
|
|
25
|
+
The `COMFYUI_URL` environment variable is set to `http://comfyui:8188` in the devcontainer so scripts and tools can connect without hard-coding the address.
|
|
26
|
+
|
|
27
|
+
The `COMFYUI_MODELS_DIR` environment variable is set to `/opt/comfyui-models` in the devcontainer — the fixed path where the shared models volume is mounted.
|
|
28
|
+
|
|
29
|
+
## Shared Models Directory
|
|
30
|
+
|
|
31
|
+
`/opt/comfyui-models` is the single models root visible to **both** the devcontainer and the ComfyUI sidecar. Files written to this directory from any side are immediately visible to the other — no restart required.
|
|
32
|
+
|
|
33
|
+
### Subdirectory Layout
|
|
34
|
+
|
|
35
|
+
`setup.sh` pre-creates all expected subdirectories on first run:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/opt/comfyui-models/
|
|
39
|
+
├── checkpoints/ — Stable Diffusion base models (.safetensors, .ckpt)
|
|
40
|
+
├── loras/ — LoRA fine-tuning weights
|
|
41
|
+
├── controlnet/ — ControlNet guidance models
|
|
42
|
+
├── clip_vision/ — CLIP Vision models
|
|
43
|
+
├── vae/ — VAE decoder models
|
|
44
|
+
├── embeddings/ — Textual inversion embeddings
|
|
45
|
+
└── upscale_models/ — Image upscaling models (ESRGAN, etc.)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Tier 1 (default): Named Docker Volume
|
|
49
|
+
|
|
50
|
+
When `COMFYUI_MODELS_HOST_PATH` is **not** set (the default), a named Docker Compose volume `comfyui-models` is used. Models persist across container rebuilds without any host-side setup and work on all platforms.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
# docker-compose.yml (simplified)
|
|
54
|
+
volumes:
|
|
55
|
+
comfyui-models:
|
|
56
|
+
name: comfyui-models
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Tier 2 (opt-in): Bind Mount to Host Path
|
|
60
|
+
|
|
61
|
+
Set `COMFYUI_MODELS_HOST_PATH` in `.devcontainer/.env` to switch to a bind mount — the same Compose config handles both cases with no structural change:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# .devcontainer/.env
|
|
65
|
+
# Note: Docker Compose does not expand '~' in .env files; always use full absolute paths.
|
|
66
|
+
|
|
67
|
+
# macOS / Linux
|
|
68
|
+
COMFYUI_MODELS_HOST_PATH=/home/you/.cache/comfyui/models
|
|
69
|
+
|
|
70
|
+
# Windows (Docker Desktop — use absolute path, no tilde)
|
|
71
|
+
COMFYUI_MODELS_HOST_PATH=C:/Users/you/.cache/comfyui/models
|
|
72
|
+
|
|
73
|
+
# Reuse an existing local ComfyUI install
|
|
74
|
+
COMFYUI_MODELS_HOST_PATH=/home/you/ComfyUI/models
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Reusing an Existing Local ComfyUI Install
|
|
78
|
+
|
|
79
|
+
Point `COMFYUI_MODELS_HOST_PATH` at your existing models directory to avoid re-downloading multi-GB files:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Use the full absolute path — Docker Compose does not expand '~' in .env files
|
|
83
|
+
COMFYUI_MODELS_HOST_PATH=/home/you/ComfyUI/models
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Downloading Models from the Devcontainer
|
|
87
|
+
|
|
88
|
+
Use `curl`, `wget`, or `huggingface-cli` inside the devcontainer to download models directly into the shared directory — they are immediately visible in ComfyUI's model browser:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Download a checkpoint
|
|
92
|
+
curl -L -o "${COMFYUI_MODELS_DIR}/checkpoints/my-model.safetensors" \
|
|
93
|
+
"https://huggingface.co/.../resolve/main/my-model.safetensors"
|
|
94
|
+
|
|
95
|
+
# Download with wget
|
|
96
|
+
wget -P "${COMFYUI_MODELS_DIR}/checkpoints/" \
|
|
97
|
+
"https://huggingface.co/.../resolve/main/my-model.safetensors"
|
|
98
|
+
|
|
99
|
+
# Download with huggingface-cli (requires huggingface_hub)
|
|
100
|
+
huggingface-cli download org/repo my-model.safetensors \
|
|
101
|
+
--local-dir "${COMFYUI_MODELS_DIR}/checkpoints/"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Files written to `$COMFYUI_MODELS_DIR` are **immediately visible in ComfyUI** — no restart is needed because the volume is live-mounted.
|
|
105
|
+
|
|
106
|
+
### Windows Note
|
|
107
|
+
|
|
108
|
+
Docker Compose does not expand `~` in `.env` files on any platform. Always use full absolute paths for `COMFYUI_MODELS_HOST_PATH`:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Windows — use absolute path with forward slashes
|
|
112
|
+
COMFYUI_MODELS_HOST_PATH=C:/Users/you/.cache/comfyui/models
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Common Workflows
|
|
116
|
+
|
|
117
|
+
### Open the Web UI
|
|
118
|
+
|
|
119
|
+
Once the container is running, open `http://localhost:8188` in your browser. The node editor loads automatically.
|
|
120
|
+
|
|
121
|
+
### Load a Workflow
|
|
122
|
+
|
|
123
|
+
1. Download a workflow JSON file (e.g. from [ComfyUI workflows](https://comfyworkflows.com/))
|
|
124
|
+
2. In the ComfyUI UI, click **Load** and select the JSON file
|
|
125
|
+
3. Connect missing model nodes to your available checkpoints and click **Queue Prompt**
|
|
126
|
+
|
|
127
|
+
### Run Inference via CLI
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Submit a workflow JSON via the ComfyUI API from inside the devcontainer
|
|
131
|
+
curl -X POST http://comfyui:8188/prompt \
|
|
132
|
+
-H "Content-Type: application/json" \
|
|
133
|
+
-d @workflow_api.json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Save Outputs
|
|
137
|
+
|
|
138
|
+
Generated images appear in the `comfyui-output` named volume by default, or at the path configured in `COMFYUI_OUTPUT_PATH`.
|
|
139
|
+
|
|
140
|
+
## GPU Acceleration
|
|
141
|
+
|
|
142
|
+
GPU passthrough is enabled out of the box. The `comfyui` service receives `gpus: all` via the `deploy.resources.reservations.devices` block in the overlay's `docker-compose.yml`:
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
deploy:
|
|
146
|
+
resources:
|
|
147
|
+
reservations:
|
|
148
|
+
devices:
|
|
149
|
+
- driver: nvidia
|
|
150
|
+
count: all
|
|
151
|
+
capabilities: [gpu]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Prerequisites
|
|
155
|
+
|
|
156
|
+
GPU passthrough requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) installed and configured on the host:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Verify NVIDIA driver is installed on the host
|
|
160
|
+
nvidia-smi
|
|
161
|
+
|
|
162
|
+
# Verify NVIDIA Container Toolkit
|
|
163
|
+
docker run --rm --gpus all nvidia/cuda:12.0-base nvidia-smi
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
> **Note:** On machines without an NVIDIA GPU or without the NVIDIA Container Toolkit, Docker Compose may warn about unresolvable device requests. Use `COMFYUI_VERSION=latest-cpu` to switch to CPU-only mode (see below).
|
|
167
|
+
|
|
168
|
+
**See also:** The [`cuda`](../cuda/README.md) overlay installs NVIDIA CUDA toolkit support in the devcontainer itself.
|
|
169
|
+
|
|
170
|
+
### CPU-Only Mode
|
|
171
|
+
|
|
172
|
+
If you do not have an NVIDIA GPU, switch to the CPU image by setting `COMFYUI_VERSION` in `.devcontainer/.env`:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
COMFYUI_VERSION=latest-cpu
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
CPU inference is significantly slower but works on any machine.
|
|
179
|
+
|
|
180
|
+
### AMD GPU (ROCm)
|
|
181
|
+
|
|
182
|
+
For AMD GPU support, use a ROCm-compatible image tag:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
COMFYUI_VERSION=latest-rocm
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**See also:** The [`rocm`](../rocm/README.md) overlay for ROCm toolkit support in the devcontainer.
|
|
189
|
+
|
|
190
|
+
## Custom Nodes
|
|
191
|
+
|
|
192
|
+
Custom nodes extend ComfyUI with new model types, loaders, and processing steps. To persist custom nodes across container rebuilds, add a named volume for the custom nodes directory via a custom Docker Compose patch in `.devcontainer/custom/docker-compose.patch.yml`:
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
services:
|
|
196
|
+
comfyui:
|
|
197
|
+
volumes:
|
|
198
|
+
- comfyui-custom-nodes:/opt/ComfyUI/custom_nodes
|
|
199
|
+
|
|
200
|
+
volumes:
|
|
201
|
+
comfyui-custom-nodes:
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Then install custom nodes from inside the running container:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
docker compose exec comfyui bash -c \
|
|
208
|
+
"cd /opt/ComfyUI/custom_nodes && git clone https://github.com/example/custom-node"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## API Usage
|
|
212
|
+
|
|
213
|
+
ComfyUI exposes a REST and WebSocket API for programmatic workflow execution.
|
|
214
|
+
|
|
215
|
+
### Submit a Workflow
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# POST a workflow (in API format) to the queue
|
|
219
|
+
curl -X POST http://comfyui:8188/prompt \
|
|
220
|
+
-H "Content-Type: application/json" \
|
|
221
|
+
-d '{"prompt": { /* workflow nodes */ }, "client_id": "my-client"}'
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Check Queue Status
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
curl http://comfyui:8188/queue
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Retrieve Output Files
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# List generated images
|
|
234
|
+
curl http://comfyui:8188/history
|
|
235
|
+
|
|
236
|
+
# Download a specific file by filename
|
|
237
|
+
curl -O http://comfyui:8188/view?filename=ComfyUI_00001_.png&type=output
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### WebSocket (real-time progress)
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
import websocket, json
|
|
244
|
+
|
|
245
|
+
ws = websocket.WebSocket()
|
|
246
|
+
ws.connect("ws://comfyui:8188/ws?clientId=my-client")
|
|
247
|
+
while True:
|
|
248
|
+
message = json.loads(ws.recv())
|
|
249
|
+
print(message) # progress updates, execution events, etc.
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Configuration
|
|
253
|
+
|
|
254
|
+
### Environment Variables
|
|
255
|
+
|
|
256
|
+
Set these in `.devcontainer/.env` (copy from `.devcontainer/.env.example`):
|
|
257
|
+
|
|
258
|
+
| Variable | Default | Description |
|
|
259
|
+
| -------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
260
|
+
| `COMFYUI_MODELS_DIR` | `/opt/comfyui-models` | Path inside devcontainer where models are accessible (set in devcontainer.patch.json; do not change) |
|
|
261
|
+
| `COMFYUI_MODELS_HOST_PATH` | _(unset)_ | Host-side bind mount source; when unset the named volume `comfyui-models` is used |
|
|
262
|
+
| `COMFYUI_OUTPUT_PATH` | _(unset)_ | Host path for generated outputs; when unset the named volume `comfyui-output` is used |
|
|
263
|
+
| `COMFYUI_VERSION` | `latest-cuda` | Docker image tag (`latest-cuda`, `latest-cpu`, `latest-rocm`) |
|
|
264
|
+
| `COMFYUI_PORT` | `8188` | Host port for the web UI |
|
|
265
|
+
| `CLI_ARGS` | `--listen 0.0.0.0` | Extra CLI arguments passed to ComfyUI at startup |
|
|
266
|
+
|
|
267
|
+
### Example `.env`
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Option A (default) — named Docker volume, no host path needed:
|
|
271
|
+
# Leave COMFYUI_MODELS_HOST_PATH unset.
|
|
272
|
+
|
|
273
|
+
# Option B — bind mount to host directory:
|
|
274
|
+
# macOS/Linux:
|
|
275
|
+
# COMFYUI_MODELS_HOST_PATH=~/.cache/comfyui/models
|
|
276
|
+
# Windows (Docker Desktop):
|
|
277
|
+
# COMFYUI_MODELS_HOST_PATH=C:/Users/you/.cache/comfyui/models
|
|
278
|
+
|
|
279
|
+
# Where generated outputs are saved (named volume by default):
|
|
280
|
+
# COMFYUI_OUTPUT_PATH=~/.cache/comfyui/output
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Troubleshooting
|
|
284
|
+
|
|
285
|
+
### Missing Model Files
|
|
286
|
+
|
|
287
|
+
**Symptom:** ComfyUI loads but shows "model not found" errors when running a workflow.
|
|
288
|
+
|
|
289
|
+
**Solution:** Ensure model files exist in the correct subdirectory inside the shared models root:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
ls "${COMFYUI_MODELS_DIR}/checkpoints/" # Should list .safetensors files
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
If `COMFYUI_MODELS_HOST_PATH` is set, verify the host directory contains the expected subdirectories.
|
|
296
|
+
|
|
297
|
+
### CUDA / GPU Not Detected
|
|
298
|
+
|
|
299
|
+
**Symptom:** ComfyUI runs on CPU despite having an NVIDIA GPU.
|
|
300
|
+
|
|
301
|
+
**Solutions:**
|
|
302
|
+
|
|
303
|
+
1. Ensure the `deploy.resources.reservations.devices` block is present in the compose service (see [GPU Acceleration](#gpu-acceleration) above)
|
|
304
|
+
2. Verify NVIDIA Container Toolkit is installed on the host: `nvidia-smi`
|
|
305
|
+
3. Switch to `COMFYUI_VERSION=latest-cuda` if using a different tag
|
|
306
|
+
|
|
307
|
+
### Port 8188 Already in Use
|
|
308
|
+
|
|
309
|
+
**Symptom:** Container fails to start with "port already in use".
|
|
310
|
+
|
|
311
|
+
**Solution:** Change the host port in `.devcontainer/.env`:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
COMFYUI_PORT=8288
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Then rebuild the container (`Dev Containers: Rebuild Container`).
|
|
318
|
+
|
|
319
|
+
### Container Starts but UI is Unreachable
|
|
320
|
+
|
|
321
|
+
**Symptom:** Browser shows "connection refused" on `http://localhost:8188`.
|
|
322
|
+
|
|
323
|
+
**Solutions:**
|
|
324
|
+
|
|
325
|
+
1. Check the container is running: `docker compose ps`
|
|
326
|
+
2. Check logs for startup errors: `docker compose logs comfyui`
|
|
327
|
+
3. Ensure `CLI_ARGS` includes `--listen 0.0.0.0` so ComfyUI accepts external connections
|
|
328
|
+
|
|
329
|
+
## References
|
|
330
|
+
|
|
331
|
+
- [ComfyUI GitHub Repository](https://github.com/comfyanonymous/ComfyUI)
|
|
332
|
+
- [ComfyUI API Documentation](https://github.com/comfyanonymous/ComfyUI/tree/master/script_examples)
|
|
333
|
+
- [ai-dock/comfyui Docker Image](https://github.com/ai-dock/comfyui)
|
|
334
|
+
- [ComfyUI Workflows Community](https://comfyworkflows.com/)
|
|
335
|
+
- [Civitai — Model Downloads](https://civitai.com/)
|
|
336
|
+
|
|
337
|
+
**Related Overlays:**
|
|
338
|
+
|
|
339
|
+
- [`cuda`](../cuda/README.md) — NVIDIA CUDA toolkit for GPU-accelerated workloads
|
|
340
|
+
- [`rocm`](../rocm/README.md) — AMD ROCm toolkit for GPU-accelerated workloads
|
|
341
|
+
- [`python`](../python/README.md) — Python runtime for automation scripts
|
|
342
|
+
- [`ollama`](../ollama/README.md) — Local LLM inference server
|