Spaces:
Paused
Paused
| FROM node:22-slim | |
| # 1. 基础依赖 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git openssh-client build-essential python3 python3-pip \ | |
| g++ make ca-certificates curl gettext \ | |
| # Playwright/Chrome 依赖 | |
| libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \ | |
| libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \ | |
| libxrandr2 libgbm1 libasound2 libpango-1.0-0 libcairo2 \ | |
| # FFmpeg 用于音频处理 | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | |
| # 安装 Playwright 和 Chromium(Playwright 会自动下载匹配的 Chromium) | |
| RUN npx playwright install chromium --with-deps && \ | |
| mv /root/.cache/ms-playwright/chromium-* /root/.cache/ms-playwright/chromium | |
| # 安装 huggingface_hub (系统不允许直接 pip 装到系统 Python,--break-system-packages强制绕过限制) | |
| RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages | |
| # 安装 whisper 和 edge-tts | |
| RUN pip3 install --no-cache-dir faster-whisper edge-tts --break-system-packages | |
| # 2. 安装最新版 OpenClaw | |
| RUN npm install -g openclaw@latest --unsafe-perm | |
| # 3. 设置工作目录并拷贝脚本 | |
| WORKDIR /app | |
| COPY sync.py . | |
| COPY start-openclaw.sh . | |
| COPY openclaw.json . | |
| RUN chmod +x start-openclaw.sh | |
| # 4. 环境变量 | |
| ENV PORT=7860 HOME=/root | |
| EXPOSE 7860 | |
| CMD ["./start-openclaw.sh"] |