-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (62 loc) · 2.2 KB
/
Copy pathDockerfile
File metadata and controls
78 lines (62 loc) · 2.2 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ARG OPENCLAW_VERSION=2026.3.28
FROM node:22-bookworm-slim AS frontend-build
WORKDIR /app/frontend
COPY apps/frontend/package.json apps/frontend/package-lock.json ./
RUN npm ci
COPY apps/frontend/ ./
RUN npm run build
FROM node:22-bookworm-slim AS llama-server-build
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
python3 \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth=1 https://github.com/ggml-org/llama.cpp.git /tmp/llama.cpp \
&& cmake -S /tmp/llama.cpp -B /tmp/llama.cpp/build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DGGML_NATIVE=OFF \
-DLLAMA_BUILD_SERVER=ON \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_TESTS=OFF \
&& cmake --build /tmp/llama.cpp/build --target llama-server -j"$(nproc)"
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
bash \
git \
ca-certificates \
libgomp1 \
chromium \
fonts-liberation \
fonts-noto-color-emoji \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --break-system-packages --no-cache-dir "psycopg[binary]" redis html2text scrapling openai numpy
ARG OPENCLAW_VERSION
RUN mkdir -p /var/tmp/openclaw-compile-cache \
&& npm install -g "openclaw@${OPENCLAW_VERSION}" node-llama-cpp @aisuite/chub \
&& npm cache clean --force \
&& rm -rf /root/.npm /root/.cache
COPY platform/bin /app/platform/bin
COPY backend /app/backend
COPY platform/deliverables /app/platform/deliverables
COPY platform/config/themes /app/platform/config/themes
COPY platform/skills /app/platform/skills
COPY platform/vendor /app/platform/vendor
COPY --from=frontend-build /app/frontend/dist /app/apps/frontend/dist
RUN find /app/platform/bin -type f \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} +
ENV OPENCLAW_DIR=/data/openclaw
ENV OPENCLAW_STATE_DIR=/data/openclaw
ENV OPENCLAW_CONFIG_PATH=/data/openclaw/openclaw.json
ENV NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache
ENV OPENCLAW_NO_RESPAWN=1
ENV OPENCLAW_ALLOW_RFC2544_BENCHMARK_RANGE=1
ENV PORT=18890
EXPOSE 18890
CMD ["bash", "/app/platform/bin/deploy/docker_bootstrap.sh"]