chore: bootstrap hermes-ui skeleton from 0.6.29 snapshot
Import the client, server, skills, tests, and build scripts as the starting point for the rebuild, then trim the surfaces this project does not ship: Electron desktop packaging, the marketing website, and the ESP32 firmware tree. CI keeps the web build, e2e, lockfile, release, and Docker workflows. Rename the package and CLI entry points to hermes-ui, drop the prepare hook so npm ci no longer triggers a build, and drop the removed tsconfig and nodemon references. Rewrite AGENTS.md, ARCHITECTURE.md, DEVELOPMENT.md, and the READMEs so the documented package map and hard rules match this repository. reference_code/ is ignored: it is a read-only snapshot, not an input to the build.
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
ARG BASE_IMAGE=nousresearch/hermes-agent:latest
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
ARG NODE_VERSION=24.15.0
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
ffmpeg \
|
||||
make \
|
||||
g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN ARCH=$(dpkg --print-architecture) \
|
||||
&& if [ "$ARCH" = "amd64" ]; then NODE_ARCH="x64"; else NODE_ARCH="$ARCH"; fi \
|
||||
&& echo "Downloading Node.js v${NODE_VERSION} for ${NODE_ARCH}" \
|
||||
&& curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.gz" \
|
||||
-o /tmp/node.tar.gz \
|
||||
&& rm -rf /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/corepack \
|
||||
/usr/local/bin/node /usr/local/bin/npm /usr/local/bin/npx /usr/local/bin/corepack \
|
||||
&& tar -xzf /tmp/node.tar.gz -C /usr/local --strip-components=1 \
|
||||
&& rm -f /tmp/node.tar.gz \
|
||||
&& node --version \
|
||||
&& npm --version
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
# Increase Node.js memory limit to prevent OOM during build
|
||||
ENV NODE_OPTIONS=--max-old-space-size=4096
|
||||
RUN npm ci --ignore-scripts && npm rebuild node-pty
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build && npm prune --omit=dev
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV HOME=/home/agent
|
||||
ENV HERMES_HOME=/home/agent/.hermes
|
||||
ENV HERMES_WEB_UI_MANAGED_GATEWAY=1
|
||||
ENV PATH=/opt/hermes/.venv/bin:$PATH
|
||||
|
||||
EXPOSE 6060
|
||||
|
||||
# 强制覆盖基础镜像的默认启动脚本,让镜像本身具备独立运行的能力
|
||||
ENTRYPOINT ["node", "dist/server/index.js"]
|
||||
CMD []
|
||||
Reference in New Issue
Block a user