Spaces:
LELELI
/
Sleeping

tianzijian commited on
Commit
c218182
·
verified ·
1 Parent(s): c4c15be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -2
Dockerfile CHANGED
@@ -40,6 +40,15 @@ RUN ARCH=$(dpkg --print-architecture) \
40
  && node --version \
41
  && npm --version
42
 
 
 
 
 
 
 
 
 
 
43
  # ==================== 工具安装 ====================
44
  # yq: 运行时修改 config.yaml
45
  RUN curl -sL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && \
@@ -75,16 +84,19 @@ WORKDIR /app
75
 
76
  COPY src/ /app/src/
77
  COPY entrypoint.sh /app/
 
 
78
  COPY config/config.yaml /data/.hermes/config.yaml
79
 
80
  # 创建数据目录
81
- RUN mkdir -p /data/.hermes /data/.hermes-web-ui /app/logs && \
82
  chmod +x /app/entrypoint.sh
83
 
84
  # 设置非 root 用户(Hugging Face Spaces 要求)
85
  RUN useradd -m -u 1000 appuser && \
86
  ln -sf /data/.hermes /home/appuser/.hermes && \
87
- chown -R appuser:appuser /data /opt/hermes-web-ui /app
 
88
 
89
  USER appuser
90
 
 
40
  && node --version \
41
  && npm --version
42
 
43
+ # ==================== Bun Runtime ====================
44
+ # 安装到 /usr/local/bin 以便所有用户(包括 appuser)都能访问
45
+ RUN echo "Installing Bun runtime" \
46
+ && curl -fsSL https://bun.sh/install | bash \
47
+ && export PATH="$PATH:/root/.bun/bin" \
48
+ && bun --version \
49
+ && cp /root/.bun/bin/bun /usr/local/bin/bun \
50
+ && chmod +x /usr/local/bin/bun
51
+
52
  # ==================== 工具安装 ====================
53
  # yq: 运行时修改 config.yaml
54
  RUN curl -sL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && \
 
84
 
85
  COPY src/ /app/src/
86
  COPY entrypoint.sh /app/
87
+ COPY image-proxy.js /app/
88
+ COPY image-gen-siliconflow.ts /app/
89
  COPY config/config.yaml /data/.hermes/config.yaml
90
 
91
  # 创建数据目录
92
+ RUN mkdir -p /data/.hermes /data/.hermes-web-ui /app/logs /home/appuser/.hermes-web-ui/logs && \
93
  chmod +x /app/entrypoint.sh
94
 
95
  # 设置非 root 用户(Hugging Face Spaces 要求)
96
  RUN useradd -m -u 1000 appuser && \
97
  ln -sf /data/.hermes /home/appuser/.hermes && \
98
+ mkdir -p /home/appuser/.cache && \
99
+ chown -R appuser:appuser /data /opt/hermes-web-ui /app /home/appuser
100
 
101
  USER appuser
102