You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add multi-arch Docker builds and auto-download template inputs (#8)
* feat: Add multi-arch Docker builds and auto-download template inputs
Multi-architecture Docker support:
- Build CPU images for both amd64 and arm64 (Apple Silicon compatible)
- CUDA images remain x86_64 only (NVIDIA requirement)
- Use QEMU emulation in CI for cross-architecture builds
- Create multi-arch manifests for seamless pulling on any platform
- Update README with Apple Silicon Docker instructions
Auto-download workflow template input files:
- Add template_inputs.sh script to download example images on startup
- Fetch manifest from GitHub workflow_templates repository
- Non-blocking download (doesn't fail startup if network unavailable)
- Cache manifest for 7 days to minimize network requests
- Skip existing files for faster subsequent startups
- Add curl and jq to runtime PATH via makeWrapper
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Address code review security and robustness concerns
Security improvements in template_inputs.sh:
- Add path traversal validation to reject file paths containing ".."
- Add file size validation (50MB limit) to prevent DoS attacks
- Add file type validation using MIME type checking
- Validate JSON manifest structure before processing
Robustness improvements:
- Capture and display actual curl error messages for debugging
- Add atomic write pattern with empty file validation
- Platform-agnostic file size detection (macOS/Linux compatible)
- Remove unused display_name variable (shellcheck warning)
CI/CD improvements in docker.yml:
- Add manifest existence verification before creating multi-arch manifests
- Use variables for architecture-specific tags for consistency
- Add clear error messages when builds fail
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+29-9Lines changed: 29 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -246,23 +246,23 @@ This structure ensures clear separation of concerns and makes the codebase easie
246
246
247
247
## Docker Support
248
248
249
-
This flake includes Docker support for running ComfyUI in a containerized environment while preserving all functionality. Both CPU and CUDA-enabled GPU images are available.
249
+
This flake includes Docker support for running ComfyUI in a containerized environment while preserving all functionality. Multi-architecture images are available for both x86_64 (amd64) and ARM64 (aarch64) platforms.
250
250
251
251
### Pre-built Images (GitHub Container Registry)
252
252
253
253
Pre-built Docker images are automatically published to GitHub Container Registry on every release. This is the easiest way to get started:
254
254
255
-
#### Pull and Run CPU Version
255
+
#### Pull and Run CPU Version (Multi-arch: amd64 + arm64)
256
256
257
257
```bash
258
-
# Pull the latest CPU version
258
+
# Pull the latest CPU version (automatically selects correct architecture)
259
259
docker pull ghcr.io/utensils/comfyui-nix:latest
260
260
261
261
# Run the container
262
262
docker run -p 8188:8188 -v "$PWD/data:/data" ghcr.io/utensils/comfyui-nix:latest
263
263
```
264
264
265
-
#### Pull and Run CUDA (GPU) Version
265
+
#### Pull and Run CUDA (GPU) Version (x86_64 only)
266
266
267
267
```bash
268
268
# Pull the latest CUDA version
@@ -274,13 +274,31 @@ docker run --gpus all -p 8188:8188 -v "$PWD/data:/data" ghcr.io/utensils/comfyui
274
274
275
275
#### Available Tags
276
276
277
-
-`latest` - Latest CPU version from main branch
278
-
-`latest-cuda` - Latest CUDA version from main branch
279
-
-`X.Y.Z` - Specific version (CPU)
280
-
-`X.Y.Z-cuda` - Specific version (CUDA)
277
+
-`latest` - Latest CPU version, multi-arch (amd64 + arm64)
278
+
-`latest-cuda` - Latest CUDA version (x86_64/amd64 only)
279
+
-`latest-amd64` - Latest CPU version for x86_64
280
+
-`latest-arm64` - Latest CPU version for ARM64
281
+
-`X.Y.Z` - Specific version (CPU, multi-arch)
282
+
-`X.Y.Z-cuda` - Specific version (CUDA, x86_64 only)
281
283
282
284
Visit the [packages page](https://github.com/utensils/comfyui-nix/pkgs/container/comfyui-nix) to see all available versions.
283
285
286
+
### Apple Silicon (M1/M2/M3) Support
287
+
288
+
The `latest` and `latest-arm64` tags work on Apple Silicon Macs via Docker Desktop:
289
+
290
+
```bash
291
+
# Works on Apple Silicon Macs
292
+
docker run -p 8188:8188 -v "$PWD/data:/data" ghcr.io/utensils/comfyui-nix:latest
293
+
```
294
+
295
+
**Important**: Docker containers on macOS cannot access the Metal GPU (MPS). The Docker image runs **CPU-only** on Apple Silicon. For GPU acceleration on Apple Silicon, use `nix run` directly instead of Docker:
296
+
297
+
```bash
298
+
# For GPU acceleration on Apple Silicon, use nix directly (not Docker)
299
+
nix run github:utensils/comfyui-nix
300
+
```
301
+
284
302
### Building the Docker Image Locally
285
303
286
304
#### CPU Version
@@ -374,11 +392,13 @@ The Docker image follows the same modular structure as the regular installation,
374
392
Docker images are automatically built and published to GitHub Container Registry via GitHub Actions:
375
393
376
394
-**Trigger events**: Push to main branch, version tags (v*), and pull requests
377
-
-**Build matrix**: Both CPU and CUDA variants are built in parallel
395
+
-**Multi-architecture**: CPU images built for both amd64 and arm64 (via QEMU emulation)
396
+
-**Build matrix**: CPU (multi-arch) and CUDA (x86_64 only) variants built in parallel
378
397
-**Tagging strategy**:
379
398
- Main branch pushes: `latest` and `X.Y.Z` (version from flake.nix)
380
399
- Version tags: `vX.Y.Z` and `latest`
381
400
- Pull requests: `pr-N` (for testing, not pushed to registry)
0 commit comments