Never mind, the AI and I figured it out. TL;DR kornia_rs ships precompiled Rust binaries built with an x86-64-v3 baseline (AVX2 + FMA3 + BMI2). On older Xeons (Ivy Bridge-EP and earlier) the import crashes with "Fatal Python error: Illegal instruction", so the container never reaches ComfyUI. Fix by placing a user_script.bash in the run folder that (1) disables AVX2/FMA3 for NumPy at runtime, (2) installs cmake, nasm, build-essential, pkg-config via sudo apt-get, (3) deletes the broken /comfy/mnt/venv/bin/cmake wrapper with rm -f, and (4) rebuilds kornia-rs from source — guarded by a pip show check so it only happens once. Full script below. ComfyUI-Nvidia-Docker fails to start on older Xeon CPUs (no AVX2) — kornia_rs "Illegal instruction" and cmake build failures — with fix Hardware/Software in question: - CPU: 2x Intel Xeon E5-2690 v2 (Ivy Bridge-EP, no AVX2 / FMA3) - GPU: NVIDIA RTX 3060 12 GB - Unraid 7.3.2 - Image: mmartial/comfyui-nvidia-docker:ubuntu24_cuda12.6.3-latest (also affects ubuntu24_cuda12.8-latest) - NVIDIA driver 610.43.03 (CUDA 13.3 host-side) SYMPTOM The container never reaches the ComfyUI server. Log ends with: Fatal Python error: Illegal instruction ... File "/comfy/mnt/venv/lib/python3.12/site-packages/kornia_rs/__init__.py", line 1 in <module> ... /comfyui-nvidia_init.bash: line 1057: 1359 Illegal instruction ${COMFY_CMDLINE_BASE} ${COMFY_CMDLINE_EXTRA} !! ERROR: ComfyUI failed or exited with an error ROOT CAUSE kornia_rs ships precompiled Rust binaries built with an x86-64-v3 baseline (AVX2 + FMA3 + BMI2). CPUs older than Haswell (like the Xeon E5-2690 v2) don't support these instructions, so the import crashes immediately. This is not an Unraid or Docker problem — it's a CPU-feature mismatch. A secondary issue appears once you try to rebuild kornia-rs from source inside the container: Traceback (most recent call last): File "/comfy/mnt/venv/bin/cmake", line 4, in <module> from cmake import cmake ModuleNotFoundError: No module named 'cmake' The venv contains a broken Python cmake wrapper at /comfy/mnt/venv/bin/cmake. The Rust build script for turbojpeg-sys (a kornia-rs dependency) picks that wrapper from PATH and fails. "pip install cmake" makes it worse; "pip uninstall cmake" leaves the wrapper file behind. FIX The project supports a user_script.bash placed in the run folder (/comfy/mnt), which is executed on every container start. Use it to: 1. Disable AVX2/FMA3 for NumPy at runtime (prevents the Illegal instruction crash). 2. Install the required system packages (cmake, nasm, build-essential, pkg-config) via sudo apt-get. 3. Delete the broken cmake wrapper (rm -f), so the Rust build picks up /usr/bin/cmake instead. 4. Rebuild kornia-rs from source — but only once, guarded by a pip show check, so subsequent container starts are fast. user_script.bash content (place in your run folder, e.g. /mnt/user/appdata/comfyui-nvidia/mnt/user_script.bash): #!/bin/bash set -e # Disable AVX2/FMA3 (Xeon E5-2690 v2 does not support these) export NPY_DISABLE_CPU_FEATURES="AVX2,FMA3" # Install build dependencies (sudo required - container runs as user 'comfy') sudo apt-get update && sudo apt-get install -y cmake nasm build-essential pkg-config # Remove the broken Python cmake wrapper from the venv rm -f /comfy/mnt/venv/bin/cmake # Make sure the system cmake is found export PATH="/usr/bin:/usr/local/bin:$PATH" # Build kornia-rs from source only once if ! /comfy/mnt/venv/bin/pip show kornia-rs > /dev/null 2>&1; then echo "== kornia-rs not installed, building from source..." /comfy/mnt/venv/bin/pip install kornia-rs --force-reinstall --no-cache-dir --no-binary :all: else echo "== kornia-rs already installed, skipping build." fi # Optional: enable Matrix sharing in ComfyUI-Manager /comfy/mnt/venv/bin/pip install matrix-nio Ownership matters. The container runs as UID 99 / GID 100 (nobody:users on Unraid). Set ownership before starting: chown 99:100 /path/to/run/user_script.bash chmod +x /path/to/run/user_script.bash NOTES / GOTCHAS ENCOUNTERED ALONG THE WAY - FORCE_CHOWN does not help for bind-mounted folders. If you see "Directory /comfy/mnt owned by unexpected user/group, expected 99:100, actual 0:0", run "chown -R 99:100 <host-path>" on the host. - apt-get inside the user script must use sudo. Without it you'll get "E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)". - Do NOT run "pip install cmake" in the venv — it creates the wrapper that breaks the build. If it's already there, "rm -f /comfy/mnt/venv/bin/cmake" is the fix (a plain "pip uninstall cmake" leaves the wrapper in place). - The "cu130 or higher" warning from comfy_kitchen in the startup log can be ignored on Ampere (RTX 30xx). It is only relevant for RTX 50xx / Blackwell. - First start is slow (Rust compile of kornia-rs can take several minutes on Ivy Bridge). Subsequent starts are fast because of the pip show guard. - Do not rename/delete the run folder between attempts unless the venv is genuinely broken. Editing user_script.bash in place is enough; the script runs on every container start. RESULT Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync pytorch version: 2.14.0+cu126 ComfyUI version: 0.36.0 Starting server To see the GUI go to: http://0.0.0.0:8188 Everything works: GPU is detected, PyTorch uses CUDA, ComfyUI + Manager start normally. Hope this saves someone else a weekend. 😇