Spaces:
Running
Running
| FROM node:22-bookworm | |
| WORKDIR /app | |
| RUN corepack enable | |
| # 安装 Python 和必要的包(用于文件同步) | |
| RUN apt-get update && apt-get install -y python3 python3-pip && \ | |
| pip3 install --break-system-packages --no-cache-dir huggingface_hub && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN npm install -g clawdbot@latest \ | |
| && mkdir -p /data/config /data/workspace /data/state | |
| ENV CLAWDBOT_CONFIG_DIR=/data/config | |
| ENV CLAWDBOT_WORKSPACE_DIR=/data/workspace | |
| ENV CLAWDBOT_STATE_DIR=/data/state | |
| ENV CLAWDBOT_CONFIG_PATH=/data/config/clawdbot.json | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| ENV CLAWDBOT_GATEWAY_PORT=${PORT} | |
| EXPOSE 7860 | |
| COPY entrypoint.sh /entrypoint.sh | |
| COPY sync_files.py /app/sync_files.py | |
| RUN chmod +x /entrypoint.sh && \ | |
| chmod +x /app/sync_files.py | |
| CMD ["/entrypoint.sh"] | |