Spaces:
Sleeping
Sleeping
| FROM node:22-slim | |
| # โโโ 1. ็ณป็ปๅบ็กไพ่ต โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git openssh-client build-essential python3 python3-pip \ | |
| make g++ curl wget ca-certificates tini procps jq unzip zip \ | |
| locales \ | |
| && sed -i '/zh_CN.UTF-8/s/^# //g' /etc/locale.gen \ | |
| && locale-gen \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # โโโ 2. Python ๅทฅๅ ท โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| RUN pip3 install --no-cache-dir huggingface_hub requests httpx --break-system-packages | |
| # โโโ 3. ๅ จๅฑๅฎ่ฃ OpenClaw โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| RUN npm install -g openclaw@latest --registry https://registry.npmmirror.com && npm cache clean --force | |
| # โโโ 4. ็ฏๅขๅ้ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| ENV LANG=zh_CN.UTF-8 \ | |
| LANGUAGE=zh_CN:zh \ | |
| LC_ALL=zh_CN.UTF-8 \ | |
| HOME=/home/node \ | |
| PORT=7860 \ | |
| NPM_CONFIG_REGISTRY=https://registry.npmmirror.com | |
| # โโโ 5. Git ๅผบๅถ HTTPS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ \ | |
| && git config --global url."https://github.com/".insteadOf git@github.com: | |
| # โโโ 6. ๅทฅไฝ็ฎๅฝ & ่ๆฌ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| WORKDIR /app | |
| COPY --chown=node:node sync.py . | |
| COPY --chown=node:node start-openclaw.sh . | |
| RUN chmod +x start-openclaw.sh | |
| # โโโ 7. ๆ้่ฐๆด โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| RUN mkdir -p /home/node/.openclaw \ | |
| && chown -R node:node /home/node | |
| # โโโ 8. ๅๆข่ณ้ root ็จๆท๏ผๅ ็ฝฎ node ็จๆท UID = 1000๏ผ็ฌฆๅ HF ่ง่๏ผโโโโโโโโโ | |
| USER 1000 | |
| # โโโ 9. ๆด้ฒ็ซฏๅฃๅนถๅฏๅจ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| EXPOSE 7860 | |
| ENTRYPOINT ["tini", "--"] | |
| CMD ["./start-openclaw.sh"] | |