From c917bc47a826aa535bf087c7a8395078d975cb99 Mon Sep 17 00:00:00 2001 From: Mark McKeen Date: Thu, 26 Mar 2026 18:07:39 -0600 Subject: [PATCH] feat: Add installer script for NemoClaw Dashboard - Auto-detects Mac/Linux environment - Validates prerequisites (node, npm, docker) - Checks for running OpenShell cluster - Installs dependencies and builds - Creates .env.local configuration - Configures GitHub SSH if available --- install.sh | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..9de309c --- /dev/null +++ b/install.sh @@ -0,0 +1,105 @@ +#!/bin/bash +# NemoClaw Dashboard Installer +# Installs and configures the OpenShell/NemoClaw control dashboard + +set -e + +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +echo -e "${GREEN}=== NemoClaw Dashboard Installer ===${NC}" + +# Check for required tools +check_command() { + if ! command -v $1 &> /dev/null; then + echo -e "${RED}Error: $1 is required but not installed.${NC}" + exit 1 + fi +} + +check_command node +check_command npm +check_command docker + +# Check if running on Mac or Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + echo -e "${YELLOW}Detected macOS${NC}" + DOCKER_CMD="/Applications/Docker.app/Contents/Resources/bin/docker" + OPEN_SHELL_NS="agent-sandbox-system" +else + echo -e "${YELLOW}Detected Linux${NC}" + DOCKER_CMD="docker" + OPEN_SHELL_NS="agent-sandbox-system" +fi + +# Check if Docker is running +echo -e "${YELLOW}Checking Docker...${NC}" +if ! $DOCKER_CMD ps &> /dev/null; then + echo -e "${RED}Error: Docker is not running.${NC}" + echo "Please start Docker Desktop and try again." + exit 1 +fi + +# Check if OpenShell container is running +echo -e "${YELLOW}Checking OpenShell cluster...${NC}" +if ! $DOCKER_CMD ps | grep -q openshell; then + echo -e "${RED}Error: OpenShell cluster container not found.${NC}" + echo "Please start your OpenShell-Mark fork first:" + echo " $DOCKER_CMD run -d --name openshell-cluster -p 8080:30051 ghcr.io/nvidia/openshell/cluster:dev" + exit 1 +fi + +# Install dependencies +echo -e "${GREEN}Installing dependencies...${NC}" +npm install + +# Build the dashboard +echo -e "${GREEN}Building dashboard...${NC}" +npm run build + +# Configure environment +if [ ! -f .env.local ]; then + echo -e "${YELLOW}Creating .env.local...${NC}" + cat > .env.local <