部署 Grokky
- 作者仓库星标 0
- 作者仓库 skills-registry
Deploy Grokky
This skill performs a full deployment of the Grokky package:
- Ensures Docker is running
- Ensures grok_spawner is running
- Builds required Docker images
- Starts runtime containers
- Builds and publishes the package
Arguments
$ARGUMENTS may include:
key: <ANTHROPIC_API_KEY>host: <publish host>
Resolve arguments
If
hostis missing: Ask: "Which host should I publish to? (e.g.,localhost,dev,public)" Wait for user input before continuing.If
keyis missing: Run:echo $ANTHROPIC_API_KEYIf empty, ask the user to provide the key and wait.
Resolve paths
Set variables explicitly:
GROKKY_ROOT=$(cd "${CLAUDE_SKILL_DIR}/../../.." && pwd)
DOCKER_DIR=$(cd "$GROKKY_ROOT/../../docker" && pwd)
COMPOSE_FILE="$DOCKER_DIR/localhost.bleeding-edge.docker-compose.yaml"
Step 1 — Ensure Docker is running
Run:
docker info > /dev/null 2>&1
If it fails:
open -a Docker
Then retry every 3 seconds (max 10 attempts):
for i in {1..10}; do
sleep 3
docker info > /dev/null 2>&1 && break
done
If still failing after 10 attempts: Stop execution and tell user: "Docker is not running. Please start Docker manually."
Step 2 — Ensure grok_spawner is running and fresh
Check if running:
docker ps --filter "name=grok_spawner" --format "{{.Names}}"
If no output, start it:
cd "$DOCKER_DIR"
GROK_SPAWNER_CORE_MODE=true docker compose -f "$COMPOSE_FILE" up -d grok_spawner
If running, check its age:
docker inspect --format '{{.Created}}' grok_spawner
Parse the timestamp and compare to now. If the container is older than 2 days, recreate it:
cd "$DOCKER_DIR"
GROK_SPAWNER_CORE_MODE=true docker compose -f "$COMPOSE_FILE" up -d --force-recreate grok_spawner
Do NOT start any other services.
Step 3 — Detect the Docker network
The network name varies by setup. Detect it from the running grok_spawner container:
DOCKER_NETWORK=$(docker ps --filter "name=grok_spawner" --format "{{.Networks}}" | head -1)
If DOCKER_NETWORK is empty, fall back:
DOCKER_NETWORK=$(docker network ls --format "{{.Name}}" | grep -E "datagrok" | head -1)
If still empty, stop and tell user: "No datagrok Docker network found. Is the platform running?"
Step 4 — Detect required image builds
cd "$GROKKY_ROOT"
CHANGED_FILES=$(git diff --name-only HEAD -- dockerfiles/; git status --short -- dockerfiles/)
Check existing images:
EXISTING_IMAGES=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep grokky || true)
Determine build flags:
Build
claude-runtimeif:dockerfiles/claude-runtime/appears in$CHANGED_FILESORgrokky-claude-runtime:adminnot found in$EXISTING_IMAGES
Build
mcp-serverif:dockerfiles/mcp-server/appears in$CHANGED_FILESORgrokky-mcp-server:adminnot found in$EXISTING_IMAGES
If neither needs building, skip to Step 6.
Step 5 — Build images (only those flagged in Step 4)
claude-runtime
cd "$GROKKY_ROOT/dockerfiles/claude-runtime"
docker build --build-arg ANTHROPIC_API_KEY=$KEY -t grokky-claude-runtime:admin .
docker rm -f grokky-claude-runtime 2>/dev/null || true
mcp-server
cd "$GROKKY_ROOT/dockerfiles/mcp-server"
docker build -t grokky-mcp-server:admin .
docker rm -f grokky-mcp-server 2>/dev/null || true
Step 6 — Build and publish
cd "$GROKKY_ROOT"
npm run build
If build fails, stop and show the error output.
If build succeeds:
grok publish $HOST
If publish fails, stop and show the error output.
Step 7 — Report results
Print:
- Whether Docker was started
- Whether grok_spawner was started
- Which images were built (or "all cached")
- Container statuses
- Publish result
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: datagrok-ai/public — distributed by TomeVault.
- 流狐分类
- 运维部署
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需手动接入
- 是否需要外部 API Key
- 需要 · Anthropic
- 检测到的系统要求
- Docker
- 底层运行要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
# Step 7 — Report results
- Whether Docker was started
- Whether grok_spawner was started
- Which images were built (or "all cached")
- Container statuses
- Publish result Run: If it fails: Then retry every 3 seconds (max 10 attempts):
Check if running: If no output, start it: If running, check its age:
The network name varies by setup. Detect it from the running grokspawner container: If DOCKERNETWORK is empty, fall back: If still empty, stop and tell user: "No datagrok Docker network found. Is the platform running?"
Check existing images: Determine build flags: Build claude-runtime if:
Step 5 — Build images (only those flagged in Step 4)
# Deploy Grokky
This skill performs a full deployment of the Grokky package:
- Ensures Docker is running
- Ensures grok_spawner is running
- Builds required Docker images
- Starts runtime containers
- Builds and publishes the package
## Arguments
`$ARGUMENTS` may include:
- `key: <ANTHROPIC_API_KEY>`
- `host: <publish host>`
### Resolve arguments
1. If `host` is missing:
Ask: "Which host should I publish to? (e.g., `localhost`, `dev`, `public`)"
Wait for user input before continuing.
2. If `key` is missing:
Run:
```bash
echo $ANTHROPIC_API_KEY
```
If empty, ask the user to provide the key and wait.
## Resolve paths
Set variables explicitly:
```bash
GROKKY_ROOT=$(cd "${CLAUDE_SKILL_DIR}/../../.." && pwd)
DOCKER_DIR=$(cd "$GROKKY_ROOT/../../docker" && pwd)
COMPOSE_FILE="$DOCKER_DIR/localhost.bleeding-edge.docker-compose.yaml"
```
---
## Step 1 — Ensure Docker is running
Run:
```bash
docker info > /dev/null 2>&1
```
If it fails:
```bash
open -a Docker
```
Then retry every 3 seconds (max 10 attempts):
```bash
for i in {1..10}; do
sleep 3
docker info > /dev/null 2>&1 && break
done
```
If still failing after 10 attempts:
Stop execution and tell user: "Docker is not running. Please start Docker manually."
---
## Step 2 — Ensure grok_spawner is running and fresh
Check if running:
```bash
docker ps --filter "name=grok_spawner" --format "{{.Names}}"
```
If no output, start it:
```bash
cd "$DOCKER_DIR"
GROK_SPAWNER_CORE_MODE=true docker compose -f "$COMPOSE_FILE" up -d grok_spawner
```
If running, check its age:
```bash
docker inspect --format '{{.Created}}' grok_spawner
```
Parse the timestamp and compare to now. If the container is older than 2 days, recreate it:
```bash
cd "$DOCKER_DIR"
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Arguments → Resolve arguments → Resolve paths → Step 1 — Ensure Docker is running → Step 2 — Ensure grokspawner is running and fresh → Step 3 — Detect the Docker network
要点 -> 1. If host is missing: Ask: "Which host should I publish to? · 2. If key is missing: Run: bash echo $ANTHROPICAPIKEY If empty, ask the user to provide the key and wait. · If still failing after 10 attempts: Stop execution and tell user: "Docker is not running. · Parse the timestamp and compare to now. · Do NOT start any other services. · The network name varies by setup. · If still empty, stop and tell user: "No datagrok Docker network found. · If neither needs building, skip to Step 6.
文件/命令 -> $ARGUMENTS · key: <ANTHROPICAPIKEY> · host: <publish host> · host · localhost · dev · public · key
内容 SHA-256 -> 130c12ea5c7c
方法与流程
适用与边界
原文中的明确线索
$ARGUMENTS、key: <ANTHROPICAPIKEY>、host: <publish host>、host、localhost、dev、public、key