-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(install): simplify DGX Spark setup, remove cgroup v2 workaround #1394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,26 +10,16 @@ Before starting, make sure you have: | |
|
|
||
| - **Docker** (pre-installed on DGX Spark, v28.x/29.x) | ||
| - **Node.js 22** (installed automatically by the NemoClaw installer) | ||
| - **OpenShell CLI** (must be installed separately before running NemoClaw — see the Quick Start below) | ||
| - **OpenShell CLI** (installed automatically by the NemoClaw installer) | ||
| - **API key** (cloud inference only) — the onboarding wizard prompts for a provider and key during setup. For example, an NVIDIA API key from [build.nvidia.com](https://build.nvidia.com) for NVIDIA Endpoints, or an OpenAI, Anthropic, or Gemini key for those providers. **If you plan to use local inference with Ollama instead, no API key is needed** — see [Local Inference with Ollama](#local-inference-with-ollama) to set up Ollama before installing NemoClaw. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| # Install OpenShell: | ||
| curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh | ||
|
|
||
| # Clone NemoClaw: | ||
| git clone https://github.com/NVIDIA/NemoClaw.git | ||
| cd NemoClaw | ||
|
|
||
| # Spark-specific setup (fixes cgroup v2 and Docker permissions — see Troubleshooting for details) | ||
| sudo ./scripts/setup-spark.sh | ||
| # Spark-specific setup (requires sudo) | ||
| curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/main/scripts/setup-spark.sh | sudo bash | ||
|
|
||
| # Install NemoClaw: | ||
| ./install.sh | ||
|
|
||
| # Alternatively, you can use the hosted install script: | ||
| # Install NemoClaw | ||
| curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash | ||
| ``` | ||
|
Comment on lines
18
to
24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an explicit shell-refresh note between Quick Start commands After Line 20, docker group membership may not be active in the current shell yet. Running Line 23 immediately (especially via full-block paste) can fail with Docker permission errors. Suggested doc tweak (keeps Quick Start to the same two commands) ```bash
# Spark-specific setup (requires sudo)
curl -fsSL https://raw.githubusercontent.com/NVIDIA/NemoClaw/main/scripts/setup-spark.sh | sudo bash
-
-# Install NemoClaw
-curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash+If 🤖 Prompt for AI Agents |
||
|
|
||
|
|
@@ -124,8 +114,6 @@ If NemoClaw is **already installed** with a cloud provider and you want to switc | |
|
|
||
| ```bash | ||
| nemoclaw uninstall | ||
|
|
||
| curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh | ||
| curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash | ||
| ``` | ||
|
|
||
|
|
@@ -158,7 +146,7 @@ openclaw agent --agent main --local -m "Which model and GPU are in use?" --sessi | |
|
|
||
| | Issue | Status | Workaround | | ||
| |-------|--------|------------| | ||
| | cgroup v2 kills k3s in Docker | Fixed in `setup-spark` | `daemon.json` cgroupns=host | | ||
| | cgroup v2 kills k3s in Docker | Fixed in recent OpenShell versions | OpenShell sets `cgroupns=host` on the gateway container directly | | ||
| | Docker permission denied | Fixed in `setup-spark` | `usermod -aG docker` | | ||
| | CoreDNS CrashLoop after setup | Fixed in `fix-coredns.sh` | Uses container gateway IP, not 127.0.0.11 | | ||
| | Image pull failure (k3s can't find built image) | OpenShell bug | `openshell gateway destroy && openshell gateway start`, re-run setup | | ||
|
|
@@ -169,27 +157,7 @@ openclaw agent --agent main --local -m "Which model and GPU are in use?" --sessi | |
|
|
||
| ### Manual Setup (if setup-spark doesn't work) | ||
|
|
||
| If `setup-spark.sh` fails, you can apply the fixes it performs by hand: | ||
|
|
||
| #### Fix Docker cgroup namespace | ||
|
|
||
| ```bash | ||
| # Check if you're on cgroup v2 | ||
| stat -fc %T /sys/fs/cgroup/ | ||
| # Expected: cgroup2fs | ||
|
|
||
| # Add cgroupns=host to Docker daemon config | ||
| sudo python3 -c " | ||
| import json, os | ||
| path = '/etc/docker/daemon.json' | ||
| d = json.load(open(path)) if os.path.exists(path) else {} | ||
| d['default-cgroupns-mode'] = 'host' | ||
| json.dump(d, open(path, 'w'), indent=2) | ||
| " | ||
|
|
||
| # Restart Docker | ||
| sudo systemctl restart docker | ||
| ``` | ||
| If `setup-spark.sh` fails, you can apply the fix it performs by hand: | ||
|
|
||
| #### Fix Docker permissions | ||
|
|
||
|
|
@@ -230,23 +198,27 @@ Error in the hyper legacy client: client error (Connect) | |
| **Cause**: Your user isn't in the `docker` group. | ||
| **Fix**: `setup-spark` runs `usermod -aG docker $USER`. You may need to log out and back in (or `newgrp docker`) for it to take effect. | ||
|
|
||
| #### cgroup v2 incompatibility | ||
| #### cgroup v2 incompatibility (resolved) | ||
|
|
||
| ```text | ||
| K8s namespace not ready | ||
| openat2 /sys/fs/cgroup/kubepods/pids.max: no | ||
| Failed to start ContainerManager: failed to initialize top level QOS containers | ||
| ``` | ||
|
|
||
| **Cause**: Spark runs cgroup v2 (Ubuntu 24.04 default). OpenShell's gateway container starts k3s, which tries to create cgroup v1-style paths that don't exist. The fix is `--cgroupns=host` on the container, but OpenShell doesn't expose that flag. | ||
| **Cause**: Spark runs cgroup v2 (Ubuntu 24.04 default). OpenShell's gateway container starts k3s, which tries to create cgroup v1-style paths that don't exist without host cgroup namespace access. | ||
|
|
||
| **Fix**: `setup-spark` sets `"default-cgroupns-mode": "host"` in `/etc/docker/daemon.json` and restarts Docker. This makes all containers use the host cgroup namespace, which is what k3s needs. | ||
| **Fix**: Recent OpenShell versions set `cgroupns=host` on the gateway container directly ([OpenShell PR #329](https://github.com/NVIDIA/OpenShell/pull/329)). No `daemon.json` workaround is needed. If you are on an older OpenShell version, upgrade with: | ||
|
|
||
| ```bash | ||
| curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh | ||
| ``` | ||
|
|
||
| ### Architecture | ||
|
|
||
| ```text | ||
| DGX Spark (Ubuntu 24.04, aarch64, cgroup v2, 128 GB unified memory) | ||
| └── Docker (28.x/29.x, cgroupns=host) | ||
| └── Docker (28.x/29.x) | ||
| └── OpenShell gateway container | ||
| └── k3s (embedded) | ||
| └── nemoclaw sandbox pod | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid reporting full success when no non-root user was detected
If the warning path at Line 45 is hit, Line 68 still reports completion even though no docker-group configuration was applied. That can create a false-success path before install.
Suggested patch
📝 Committable suggestion
🤖 Prompt for AI Agents