File size: 1,503 Bytes
7540aea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6aeba60
7540aea
 
 
 
 
 
 
ce2c2fb
 
 
 
 
 
 
7540aea
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM node:22-slim

# Install system dependencies for better-sqlite3 and bash execution
RUN apt-get update && apt-get install -y \
    python3 \
    make \
    g++ \
    git \
    curl \
    ripgrep \
    && rm -rf /var/lib/apt/lists/*

# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate

WORKDIR /app

# Copy package files first for better caching
COPY package.json pnpm-lock.yaml ./

# Install dependencies
RUN pnpm install --frozen-lockfile || pnpm install

# Copy source code
COPY . .

# Build the application
RUN pnpm build

# Create workspace directory for agent
RUN mkdir -p /home/ubuntu && chown node:node /home/ubuntu && chmod 755 /home/ubuntu

# HF Spaces uses port 7860
ENV PORT=7860
ENV NODE_ENV=production
ENV DEV_MODE=true
ENV DATABASE_PATH=/app/claw-web.db
ENV WORKSPACE_DIR=/home/ubuntu

# ═══════════════════════════════════════════════════════════════
# HARDCODED: DeepInfra + Qwen3-Coder-480B-A35B-Instruct-Turbo
# ═══════════════════════════════════════════════════════════════
ENV BUILT_IN_FORGE_API_URL=https://api.deepinfra.com/v1/openai
ENV BUILT_IN_FORGE_API_KEY=D0mgWASDNh9nTUWCmhM1fTIyJ8lBWMWg
ENV DEFAULT_MODEL=Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo

EXPOSE 7860

CMD ["node", "dist/index.js"]