fix: improve setup.sh and brev-setup.sh for CI and non-interactive use#1090
fix: improve setup.sh and brev-setup.sh for CI and non-interactive use#1090cv merged 2 commits intoNVIDIA:mainfrom
Conversation
setup.sh: - Add timestamped log output ([HH:MM:SS] prefix) for CI visibility - Support NEMOCLAW_SANDBOX_NAME env var for custom sandbox names - Add --no-tty flag to openshell sandbox create for non-interactive mode - Pre-build base image locally when GHCR image is unavailable (forks) - Add background progress reporter during sandbox build (heartbeat every 30s with Docker step info, filters secrets from output) - Show build elapsed time on completion brev-setup.sh: - Add timestamped log output matching setup.sh format - Support SKIP_VLLM=1 to skip vLLM install on CPU-only instances
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdded timestamping to logging functions in setup scripts. Modified sandbox name resolution to support Changes
Sequence Diagram(s)sequenceDiagram
participant Script as Setup Script
participant Registry as Docker Registry
participant Docker as Local Docker
participant FS as Filesystem
participant Build as Docker Build
participant Sandbox as openshell
Script->>Docker: Check if BASE_IMAGE exists locally
alt Image Not Found
Script->>Registry: docker pull BASE_IMAGE
alt Pull Succeeds
Registry-->>Docker: Image loaded
else Pull Fails
Script->>FS: Check for Dockerfile.base
alt Dockerfile exists
Script->>Build: docker build -f Dockerfile.base
Build-->>Docker: Image created locally
else File Not Found
Script->>Script: Continue without base image
end
end
end
Script->>Sandbox: openshell sandbox create with progress tracking
par Main Process
Sandbox->>Sandbox: Build sandbox
and Background Reporter
Script->>Script: Start progress reporter loop
loop Every interval
Script->>FS: Tail build log
Script->>Script: Extract last Docker Step X/Y
Script->>Script: Log heartbeat with elapsed time
end
end
Sandbox-->>Script: Build completes
Script->>Script: Terminate reporter, log duration & exit code
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Improves
setup.shandbrev-setup.shfor CI pipelines and non-interactive environments.setup.sh
[HH:MM:SS]prefix on all info/warn/fail messages for CI log correlationNEMOCLAW_SANDBOX_NAMEenv var — allows callers to specify the sandbox name without positional args (falls back tonemoclawdefault)--no-ttyflag onopenshell sandbox create— prevents hangs when running in non-interactive SSH sessions or CIDockerfile.baselocally when the GHCR image isn't available (common on forks before the first base-image workflow run)brev-setup.sh
SKIP_VLLM=1support — skips vLLM installation on CPU-only instances where GPU inference isn't availableMotivation
These changes came from building E2E test infrastructure that bootstraps NemoClaw on ephemeral Brev instances via SSH. Without them,
setup.shwould hang on TTY prompts, produce un-timestamped output making CI logs hard to debug, and fail on forks without GHCR access.Testing
Summary by CodeRabbit
New Features
Improvements