Skip to content

change max GPU number - #3

Closed
maggiezha wants to merge 27 commits into
mainfrom
2026-05-27-0hlj
Closed

change max GPU number#3
maggiezha wants to merge 27 commits into
mainfrom
2026-05-27-0hlj

Conversation

@maggiezha

Copy link
Copy Markdown
Owner

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Your Name your-email@example.com

maggiezha and others added 27 commits May 27, 2026 23:53
Split NVIDIA Build (nvapi-*) and Inference Hub (sk-*) env vars, load keys from
~/.nemoclaw/secrets.env, route Ultra via inference-api, and fix Tavily on rebuild resume.
Keep Tavily/Telegram support alongside upstream Brave egress verification and provider profile registration.
Removed unnecessary details about Dual NVIDIA keys and Secrets file while retaining key features for clarity.
Updated the README.fork.md to include new information and images.
Set toolSearch false for Ultra and document web_search usage so Tavily runs instead of failing tool_search_code.
Introduce the nemoclaw-cpu Helm chart with metrics-server-based autoscaling,
install/recover/reset/load-test scripts, and documentation for running
Inference Hub agents on MicroK8s (min 1, max 7 replicas per 8 vCPU).
Added an image and recovery instructions to README.
Introduce nemoclaw-gpu (Ollama + agent, DCGM gpu_utilization_percent HPA) with load-test and ops scripts tuned for 4× L40S. Split deploy guides into README-gpu/README-cpu and refresh the CPU chart helpers.
Removed 'GPU' from the title of the deployment README.
Updated images in README-gpu.md to include width and height attributes for better display.
Updated image syntax and added additional screenshots in the README for GPU deployment.
Updated README for GPU deployment with HPA details.
Signed-off-by: maggiezha <42832776+maggiezha@users.noreply.github.com>
Added port 9000 for the CPU deployment section.
Removed the third port entry from the table.
Signed-off-by: maggiezha <42832776+maggiezha@users.noreply.github.com>
Signed-off-by: maggiezha <42832776+maggiezha@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 126 files, which is 26 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1583d5e4-dc1c-480c-98c4-82466124aead

📥 Commits

Reviewing files that changed from the base of the PR and between 1daf081 and 715b833.

📒 Files selected for processing (126)
  • .cursor/skills/nemoclaw-k8s-hpa/SKILL.md
  • .cursor/skills/nemoclaw-k8s-hpa/reference.md
  • .gitignore
  • Dockerfile
  • README.fork.md
  • README.md
  • deploy/README-cpu.md
  • deploy/README-gpu.md
  • deploy/README.md
  • deploy/helm/README.md
  • deploy/helm/nemoclaw-cpu/.helmignore
  • deploy/helm/nemoclaw-cpu/Chart.yaml
  • deploy/helm/nemoclaw-cpu/README.md
  • deploy/helm/nemoclaw-cpu/files/agent-metrics.mjs
  • deploy/helm/nemoclaw-cpu/files/agent-server.mjs
  • deploy/helm/nemoclaw-cpu/files/cpu-spin-worker.mjs
  • deploy/helm/nemoclaw-cpu/files/load-generator.mjs
  • deploy/helm/nemoclaw-cpu/files/questions-sample.txt
  • deploy/helm/nemoclaw-cpu/monitoring/kube-prometheus-microk8s.yaml
  • deploy/helm/nemoclaw-cpu/monitoring/prometheus-adapter-values.yaml
  • deploy/helm/nemoclaw-cpu/observability.md
  • deploy/helm/nemoclaw-cpu/scripts/cluster-recover.sh
  • deploy/helm/nemoclaw-cpu/scripts/hpa-common.sh
  • deploy/helm/nemoclaw-cpu/scripts/hpa-load-test.sh
  • deploy/helm/nemoclaw-cpu/scripts/hpa-reset.sh
  • deploy/helm/nemoclaw-cpu/scripts/install-hpa.sh
  • deploy/helm/nemoclaw-cpu/scripts/install-performance-hpa.sh
  • deploy/helm/nemoclaw-cpu/templates/NOTES.txt
  • deploy/helm/nemoclaw-cpu/templates/_helpers.tpl
  • deploy/helm/nemoclaw-cpu/templates/configmap.yaml
  • deploy/helm/nemoclaw-cpu/templates/deployment.yaml
  • deploy/helm/nemoclaw-cpu/templates/hpa.yaml
  • deploy/helm/nemoclaw-cpu/templates/namespace.yaml
  • deploy/helm/nemoclaw-cpu/templates/secret.yaml
  • deploy/helm/nemoclaw-cpu/templates/service.yaml
  • deploy/helm/nemoclaw-cpu/templates/servicemonitor.yaml
  • deploy/helm/nemoclaw-cpu/values-step2-hpa-performance.yaml
  • deploy/helm/nemoclaw-cpu/values-step2-hpa-saturate.yaml
  • deploy/helm/nemoclaw-cpu/values-step2-hpa.yaml
  • deploy/helm/nemoclaw-cpu/values.yaml
  • deploy/helm/nemoclaw-gpu/.helmignore
  • deploy/helm/nemoclaw-gpu/Chart.yaml
  • deploy/helm/nemoclaw-gpu/README.md
  • deploy/helm/nemoclaw-gpu/files/agent-metrics.mjs
  • deploy/helm/nemoclaw-gpu/files/agent-server.mjs
  • deploy/helm/nemoclaw-gpu/files/load-generator.mjs
  • deploy/helm/nemoclaw-gpu/files/ollama-start.sh
  • deploy/helm/nemoclaw-gpu/files/questions-sample.txt
  • deploy/helm/nemoclaw-gpu/monitoring/dcgm-servicemonitor.yaml
  • deploy/helm/nemoclaw-gpu/monitoring/kube-prometheus-microk8s.yaml
  • deploy/helm/nemoclaw-gpu/monitoring/prometheus-adapter-gpu-values.yaml
  • deploy/helm/nemoclaw-gpu/scripts/cluster-recover.sh
  • deploy/helm/nemoclaw-gpu/scripts/get-agent-pods.sh
  • deploy/helm/nemoclaw-gpu/scripts/get-hpa.sh
  • deploy/helm/nemoclaw-gpu/scripts/hpa-common.sh
  • deploy/helm/nemoclaw-gpu/scripts/hpa-load-test.sh
  • deploy/helm/nemoclaw-gpu/scripts/hpa-reset.sh
  • deploy/helm/nemoclaw-gpu/scripts/hpa-watch.sh
  • deploy/helm/nemoclaw-gpu/scripts/install-hpa.sh
  • deploy/helm/nemoclaw-gpu/templates/NOTES.txt
  • deploy/helm/nemoclaw-gpu/templates/_helpers.tpl
  • deploy/helm/nemoclaw-gpu/templates/configmap.yaml
  • deploy/helm/nemoclaw-gpu/templates/deployment.yaml
  • deploy/helm/nemoclaw-gpu/templates/hpa.yaml
  • deploy/helm/nemoclaw-gpu/templates/namespace.yaml
  • deploy/helm/nemoclaw-gpu/templates/pvc.yaml
  • deploy/helm/nemoclaw-gpu/templates/service.yaml
  • deploy/helm/nemoclaw-gpu/templates/servicemonitor.yaml
  • deploy/helm/nemoclaw-gpu/values-load-test-hpa.yaml
  • deploy/helm/nemoclaw-gpu/values-step2-hpa-latency.yaml
  • deploy/helm/nemoclaw-gpu/values-step2-hpa-performance.yaml
  • deploy/helm/nemoclaw-gpu/values-step2-hpa.yaml
  • deploy/helm/nemoclaw-gpu/values.yaml
  • deploy/scripts/install-both.sh
  • deploy/scripts/status-both.sh
  • deploy/scripts/uninstall-both.sh
  • docs/network-policy/integration-policy-examples.mdx
  • docs/security/credential-storage.mdx
  • nemoclaw-blueprint/blueprint.yaml
  • nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-ultra-managed-inference.json
  • nemoclaw-blueprint/policies/presets/tavily.yaml
  • nemoclaw-blueprint/router/pool-config.yaml
  • nemoclaw/src/index.ts
  • nemoclaw/src/register.test.ts
  • scripts/checks/direct-credential-env.ts
  • scripts/examples/nemotron-ultra-inference.py
  • scripts/generate-openclaw-config.py
  • scripts/setup-tavily-search.sh
  • scripts/test-tavily-flow.sh
  • scripts/verify-tavily-openclaw-config.py
  • secrets.env.example
  • src/commands/credentials/init-secrets.ts
  • src/lib/cli/public-display-defaults.ts
  • src/lib/credentials/command-support.ts
  • src/lib/credentials/secrets-env.test.ts
  • src/lib/credentials/secrets-env.ts
  • src/lib/credentials/store.ts
  • src/lib/inference/config.test.ts
  • src/lib/inference/config.ts
  • src/lib/inference/model-prompts.ts
  • src/lib/inference/provider-models.ts
  • src/lib/inference/web-search.ts
  • src/lib/onboard.ts
  • src/lib/onboard/dashboard.ts
  • src/lib/onboard/dockerfile-patch.ts
  • src/lib/onboard/machine/handlers/finalization.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/policy-presets.ts
  • src/lib/onboard/policy-selection.ts
  • src/lib/onboard/providers.test.ts
  • src/lib/onboard/providers.ts
  • src/lib/onboard/summary.test.ts
  • src/lib/onboard/summary.ts
  • src/lib/onboard/web-search-flow.ts
  • src/lib/onboard/web-search-verify.test.ts
  • src/lib/onboard/web-search-verify.ts
  • src/lib/policy/index.ts
  • src/lib/state/onboard-session.ts
  • src/lib/validation.test.ts
  • src/lib/validation.ts
  • test/credentials.test.ts
  • test/generate-openclaw-config.test.ts
  • test/onboard-brave-validation.test.ts
  • test/onboard-policy-suggestions.test.ts
  • test/validate-blueprint.test.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-27-0hlj

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

local deploy="${2:?deploy}"
local hpa_name="${3:-${deploy}}"
local min="${4:-1}"
local max="${5:-7}"

local spec_min spec_max desired deploy_spec
spec_min="$(kubectl get "horizontalpodautoscaler/${hpa_name}" -n "${ns}" -o jsonpath='{.spec.minReplicas}' 2>/dev/null || echo 0)"
spec_max="$(kubectl get "horizontalpodautoscaler/${hpa_name}" -n "${ns}" -o jsonpath='{.spec.maxReplicas}' 2>/dev/null || echo 0)"
spec_min="$(kubectl get "horizontalpodautoscaler/${hpa_name}" -n "${ns}" -o jsonpath='{.spec.minReplicas}' 2>/dev/null || echo 0)"
spec_max="$(kubectl get "horizontalpodautoscaler/${hpa_name}" -n "${ns}" -o jsonpath='{.spec.maxReplicas}' 2>/dev/null || echo 0)"
desired="$(kubectl get "horizontalpodautoscaler/${hpa_name}" -n "${ns}" -o jsonpath='{.status.desiredReplicas}' 2>/dev/null || echo "")"
deploy_spec="$(kubectl get "deployment/${deploy}" -n "${ns}" -o jsonpath='{.spec.replicas}' 2>/dev/null || echo "")"
DEPLOYMENT="${DEPLOYMENT:-${RELEASE}-nemoclaw-cpu-agent}"
SERVICE="${SERVICE:-${DEPLOYMENT}}"
SERVICE_PORT="${SERVICE_PORT:-8080}"
LAST_HPA_LINE=""
set -eu

MODEL="${OLLAMA_MODEL:?OLLAMA_MODEL required}"
HOST="${OLLAMA_HOST:-0.0.0.0:11434}"
DEPLOYMENT="${DEPLOYMENT:-$(RELEASE="${RELEASE}" CHART_NAME=nemoclaw-gpu hpa_common_agent_deployment)}"
SERVICE="${SERVICE:-$(RELEASE="${RELEASE}" CHART_NAME=nemoclaw-gpu hpa_common_agent_service)}"
SERVICE_PORT="${SERVICE_PORT:-8081}"
LAST_HPA_LINE=""
}

helm_install
hpa_common_kick_deployment "${NAMESPACE}" "${DEPLOYMENT}" && helm_install || true
}

hpa_common_agent_deployment() {
echo "$(hpa_common_release_fullname)-agent"
}

hpa_common_agent_service() {
echo "$(hpa_common_release_fullname)-agent"
hpa_common_gpu_recreate_stale_workload "${NAMESPACE}" "${DEPLOYMENT}" "${DEPLOYMENT}"

helm_install
hpa_common_kick_deployment "${NAMESPACE}" "${DEPLOYMENT}" && helm_install || true

from __future__ import annotations

import asyncio
if (fs.existsSync(secretsFile)) {
return { ok: true, created: false, path: secretsFile };
}
fs.writeFileSync(secretsFile, SECRETS_ENV_TEMPLATE, { encoding: "utf-8", mode: 0o600 });
res.end(text);
} catch (err) {
res.writeHead(502, { "content-type": "application/json" });
res.end(JSON.stringify({ error: String(err) }));
Comment on lines +58 to +61
body: JSON.stringify({
messages: [{ role: "user", content: q }],
max_tokens: 24,
}),
loops.push(
(async () => {
const rampEnd = Date.now() + RAMP_SEC * 1000;
let limit = Math.max(2, Math.ceil(share / 4));
res.end(text);
} catch (err) {
res.writeHead(502, { "content-type": "application/json" });
res.end(JSON.stringify({ error: String(err) }));
Comment on lines +99 to +107
{
hostname: process.env.KUBERNETES_SERVICE_HOST,
port: process.env.KUBERNETES_SERVICE_PORT || 443,
path,
method: "GET",
headers: { Authorization: `Bearer ${token}` },
ca,
rejectUnauthorized: true,
},
Comment on lines +464 to +468
body: JSON.stringify({
messages: [{ role: "user", content: q }],
max_tokens: MAX_TOKENS,
stream: false,
}),
import https from "node:https";
import { setTimeout as sleep } from "node:timers/promises";

const SERVICE_FALLBACK = (process.env.TARGET_URL || "http://nemoclaw-gpu-agent:8081").replace(
Comment thread src/lib/validation.ts
const isNvidia = credentialEnv === "NVIDIA_API_KEY";
const isNvidiaBuild = credentialEnv === "NVIDIA_API_KEY";
const isInferenceHub = credentialEnv === "NVIDIA_INFERENCE_HUB_API_KEY";
const isNvidia = isNvidiaBuild || isInferenceHub;
@maggiezha maggiezha closed this Aug 11, 2026
@maggiezha

Copy link
Copy Markdown
Owner Author

move to other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants