Spaces:
Runtime error
Runtime error
File size: 727 Bytes
7ddf331 5db454d 7ddf331 | 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 | FROM node:18-slim
# 安装系统工具和 HF CLI
RUN apt-get update && apt-get install -y \
curl \
bash \
git \
python3 \
python3-pip \
python3.11-venv \
procps \
iputils-ping \
nano \
vim \
telnet \
net-tools \
wget \
rsync \
&& curl -LsSf https://hf.co/cli/install.sh | bash \
&& rm -rf /var/lib/apt/lists/*
# 安装 OpenCode
RUN npm i -g opencode-ai
# 创建目录
RUN mkdir -p /home && chmod 777 /home
# 复制入口脚本
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# 环境设置
ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/.local/bin:$PATH"
ENV NODE_OPTIONS="--max-old-space-size=14336"
EXPOSE 7860
CMD ["/entrypoint.sh"] |