Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ HF_TOKEN=hf_your_token_here
RUNPOD_POD_ID=your-pod-id
RUNPOD_VLLM_API_KEY=your-secure-api-key-here

# Clawdbot Web UI (password for accessing the control panel)
CLAWDBOT_WEB_PASSWORD=clawdbot
# OpenClaw Configuration
OPENCLAW_STATE_DIR=/workspace/.openclaw
OPENCLAW_WORKSPACE=/workspace/openclaw
OPENCLAW_WEB_PASSWORD=openclaw

# Messaging Integrations (optional)
TELEGRAM_BOT_TOKEN=
Expand Down
118 changes: 74 additions & 44 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Build and Push Docker Images

on:
push:
branches: [main, feat/add-model-folders, gguf-v3]
paths:
- 'models/**'
- 'Dockerfile'
- '.github/workflows/docker-build.yml'
branches: [main]
tags: ['*']
pull_request:
paths:
- 'models/**'
Expand All @@ -26,12 +23,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Determine build type
id: build_type
run: |
Expand All @@ -44,6 +35,12 @@ jobs:
- name: Set environment variables
run: |
echo "DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO || secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BRANCH_NAME="${{ github.head_ref }}"
else
BRANCH_NAME="${GITHUB_REF##refs/heads/}"
fi
BRANCH_TAG=$(echo "$BRANCH_NAME" | sed 's|/|-|g')

if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF##refs/tags/}" >> $GITHUB_ENV
Expand All @@ -52,22 +49,33 @@ jobs:
echo "VERSION=latest" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
else
BRANCH_NAME=$(echo ${GITHUB_REF##refs/heads/} | sed 's/\//-/g')
echo "VERSION=dev-${BRANCH_NAME}" >> $GITHUB_ENV
echo "VERSION=${BRANCH_TAG}" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
fi
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
echo "PUSH_IMAGES=false" >> $GITHUB_ENV
else
echo "PUSH_IMAGES=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
if: env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: models/glm47-flash-awq-4bit
push: true
push: ${{ env.PUSH_IMAGES == 'true' }}
tags: |
${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-awq-4bit:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/clawdbot-glm47-flash-awq-4bit:latest', env.DOCKERHUB_REPO) || '' }}
${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-awq-4bit:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/openclaw-glm47-flash-awq-4bit:latest', env.DOCKERHUB_REPO) || '' }}
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-awq-4bit:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-awq-4bit:buildcache,mode=max
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-awq-4bit:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-awq-4bit:buildcache,mode=max

# Disabled - vLLM NVFP4 has bugs with GLM-4.7 MLA on Blackwell
# See models/glm47-flash-nvfp4-5090/ISSUES.md
Expand All @@ -81,12 +89,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Determine build type
id: build_type
run: |
Expand All @@ -99,6 +101,12 @@ jobs:
- name: Set environment variables
run: |
echo "DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO || secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BRANCH_NAME="${{ github.head_ref }}"
else
BRANCH_NAME="${GITHUB_REF##refs/heads/}"
fi
BRANCH_TAG=$(echo "$BRANCH_NAME" | sed 's|/|-|g')

if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF##refs/tags/}" >> $GITHUB_ENV
Expand All @@ -107,22 +115,33 @@ jobs:
echo "VERSION=latest" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
else
BRANCH_NAME=$(echo ${GITHUB_REF##refs/heads/} | sed 's/\//-/g')
echo "VERSION=dev-${BRANCH_NAME}" >> $GITHUB_ENV
echo "VERSION=${BRANCH_TAG}" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
fi
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
echo "PUSH_IMAGES=false" >> $GITHUB_ENV
else
echo "PUSH_IMAGES=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
if: env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: models/glm47-flash-nvfp4-5090
push: true
push: ${{ env.PUSH_IMAGES == 'true' }}
tags: |
${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-nvfp4-5090:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/clawdbot-glm47-flash-nvfp4-5090:latest', env.DOCKERHUB_REPO) || '' }}
${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-nvfp4-5090:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/openclaw-glm47-flash-nvfp4-5090:latest', env.DOCKERHUB_REPO) || '' }}
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-nvfp4-5090:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-nvfp4-5090:buildcache,mode=max
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-nvfp4-5090:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-nvfp4-5090:buildcache,mode=max

# GLM-4.7-Flash GGUF with llama.cpp - WORKING on RTX 5090!
build-glm47-flash-gguf-llamacpp:
Expand All @@ -134,12 +153,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Determine build type
id: build_type
run: |
Expand All @@ -152,6 +165,12 @@ jobs:
- name: Set environment variables
run: |
echo "DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO || secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BRANCH_NAME="${{ github.head_ref }}"
else
BRANCH_NAME="${GITHUB_REF##refs/heads/}"
fi
BRANCH_TAG=$(echo "$BRANCH_NAME" | sed 's|/|-|g')

if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF##refs/tags/}" >> $GITHUB_ENV
Expand All @@ -160,22 +179,33 @@ jobs:
echo "VERSION=latest" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
else
BRANCH_NAME=$(echo ${GITHUB_REF##refs/heads/} | sed 's/\//-/g')
echo "VERSION=dev-${BRANCH_NAME}" >> $GITHUB_ENV
echo "VERSION=${BRANCH_TAG}" >> $GITHUB_ENV
echo "ALSO_LATEST=false" >> $GITHUB_ENV
fi
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
echo "PUSH_IMAGES=false" >> $GITHUB_ENV
else
echo "PUSH_IMAGES=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
if: env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: models/glm47-flash-gguf-llamacpp
push: true
push: ${{ env.PUSH_IMAGES == 'true' }}
tags: |
${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-gguf:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/clawdbot-glm47-flash-gguf:latest', env.DOCKERHUB_REPO) || '' }}
${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-gguf:${{ env.VERSION }}
${{ env.ALSO_LATEST == 'true' && format('{0}/openclaw-glm47-flash-gguf:latest', env.DOCKERHUB_REPO) || '' }}
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-gguf:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/clawdbot-glm47-flash-gguf:buildcache,mode=max
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-gguf:buildcache
cache-to: type=registry,ref=${{ env.DOCKERHUB_REPO }}/openclaw-glm47-flash-gguf:buildcache,mode=max

# Disabled for now
# build-glm47-flash-fp16:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Thumbs.db
*.swp
*.swo

# Node (if running Clawdbot locally)
# Node (if running OpenClaw locally)
node_modules/

# Python
Expand Down
28 changes: 14 additions & 14 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

RunPod-optimized Docker deployment for running Clawdbot (AI coding assistant) with GLM-4.7 language models using vLLM for inference. Multiple model variants are optimized for different GPU tiers (A100, H100, B200, RTX 5090).
RunPod-optimized Docker deployment for running OpenClaw (AI coding assistant) with GLM-4.7 language models using vLLM for inference. Multiple model variants are optimized for different GPU tiers (A100, H100, B200, RTX 5090).

## Build Commands

```bash
# Build a specific model variant
docker build -t clawdbot-glm47-flash-awq-4bit models/glm47-flash-awq-4bit/
docker build -t clawdbot-glm47-flash-fp16 models/glm47-flash-fp16/
docker build -t clawdbot-glm47-flash-nvfp4-5090 models/glm47-flash-nvfp4-5090/
docker build -t openclaw-glm47-flash-awq-4bit models/glm47-flash-awq-4bit/
docker build -t openclaw-glm47-flash-fp16 models/glm47-flash-fp16/
docker build -t openclaw-glm47-flash-nvfp4-5090 models/glm47-flash-nvfp4-5090/

# Push to Docker Hub
docker tag clawdbot-glm47-flash-awq-4bit yourusername/clawdbot-glm47-flash-awq-4bit:latest
docker push yourusername/clawdbot-glm47-flash-awq-4bit:latest
docker tag openclaw-glm47-flash-awq-4bit yourusername/openclaw-glm47-flash-awq-4bit:latest
docker push yourusername/openclaw-glm47-flash-awq-4bit:latest
```

## Local Development
Expand Down Expand Up @@ -56,12 +56,12 @@ models/ # Model-specific Dockerfiles and configs
└── glm47-reap-w4a16/ # REAP W4A16 (B200)

scripts/ # Startup orchestration
├── entrypoint.sh # Docker entrypoint (starts vLLM + Clawdbot)
├── entrypoint.sh # Docker entrypoint (starts vLLM + OpenClaw)
├── start-vllm.sh # vLLM server with GPU detection
└── setup-clawdbot.sh # Clawdbot installation
└── setup-openclaw.sh # OpenClaw installation

config/ # Runtime configuration
├── clawdbot.json # Clawdbot config template
├── openclaw.json # OpenClaw config template
└── workspace/ # Agent identity and system docs
```

Expand All @@ -70,9 +70,9 @@ config/ # Runtime configuration
| Port | Service |
|-------|-------------------|
| 8000 | vLLM API |
| 18789 | Clawdbot Gateway |
| 18790 | Clawdbot Bridge |
| 18793 | Clawdbot Canvas |
| 18789 | OpenClaw Gateway |
| 18790 | OpenClaw Bridge |
| 18793 | OpenClaw Canvas |
| 22 | SSH |

## CI/CD (GitHub Actions)
Expand All @@ -98,10 +98,10 @@ Key variables from `.env.example`:
## Entrypoint Flow

1. Configure environment and detect GPU count
2. Generate `clawdbot.json` with vLLM provider settings
2. Generate `openclaw.json` with vLLM provider settings
3. Start vLLM server in background
4. Wait for health check (max 5 minutes)
5. Start Clawdbot gateway
5. Start OpenClaw gateway
6. Handle graceful shutdown on SIGTERM/SIGINT

## RunPod SSH Access
Expand Down
27 changes: 14 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Clawdbot + vLLM Docker Image for RunPod
# OpenClaw + vLLM Docker Image for RunPod
# Pre-configured with everything needed for AI coding assistant
FROM runpod/pytorch:2.4.0-py3.11-cuda12.4.1-devel-ubuntu22.04

LABEL maintainer="RunPod Clawdbot"
LABEL description="Clawdbot AI assistant with vLLM for local LLM inference"
LABEL maintainer="RunPod OpenClaw"
LABEL description="OpenClaw AI assistant with vLLM for local LLM inference"

# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
ENV HF_HOME=/workspace/huggingface
ENV CLAWDBOT_STATE_DIR=/workspace/.clawdbot
ENV OPENCLAW_STATE_DIR=/workspace/.openclaw
ENV OPENCLAW_WORKSPACE=/workspace/openclaw

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -27,27 +28,27 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
# Install vLLM
RUN pip install --no-cache-dir vllm

# Install Clawdbot
RUN npm install -g clawdbot@latest
# Install OpenClaw
RUN npm install -g openclaw@latest

# Create workspace directories
RUN mkdir -p /workspace/huggingface \
/workspace/.clawdbot \
/workspace/clawd \
/workspace/.openclaw \
/workspace/openclaw \
/workspace/scripts

# Copy startup script
COPY scripts/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Copy default Clawdbot workspace files
COPY config/workspace/ /workspace/clawd/
# Copy default OpenClaw workspace files
COPY config/workspace/ /workspace/openclaw/

# Expose ports
# 8000 - vLLM API
# 18789 - Clawdbot Gateway WebSocket
# 18790 - Clawdbot Bridge
# 18793 - Clawdbot Canvas
# 18789 - OpenClaw Gateway WebSocket
# 18790 - OpenClaw Bridge
# 18793 - OpenClaw Canvas
# 22 - SSH (RunPod adds this)
EXPOSE 8000 18789 18790 18793

Expand Down
Loading