kines9661 commited on
Commit
f74ea9e
·
verified ·
1 Parent(s): c1a43bf

Upload 11 files

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -13
Dockerfile CHANGED
@@ -1,9 +1,8 @@
1
  # ============================================
2
  # CLIProxyAPI Plus - Hugging Face Spaces Dockerfile
3
  # ============================================
4
- # This Dockerfile creates a container with both:
5
- # - Go API Server (CLIProxyAPI Plus)
6
- # - Streamlit Frontend UI
7
  # ============================================
8
 
9
  # ============================================
@@ -60,22 +59,21 @@ RUN mkdir -p /app/go-server \
60
  && mkdir -p /root/.cli-proxy-api \
61
  && mkdir -p /app/logs
62
 
63
- # 複製 Go 二進制文件和配置
64
  COPY --from=go-builder /build/CLIProxyAPIPlus /app/go-server/CLIProxyAPIPlus
65
- COPY config.example.yaml /app/config/config.yaml
66
 
67
- # 複製 Streamlit 應用
68
- COPY hf-spaces/streamlit_app/ /app/streamlit/
69
- COPY hf-spaces/requirements.txt /app/streamlit/
70
 
71
  # 安裝 Python 依賴
72
  RUN pip install --no-cache-dir -r /app/streamlit/requirements.txt
73
 
74
- # 複製 Supervisor 配置
75
- COPY hf-spaces/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
76
 
77
- # 複製啟動腳本
78
- COPY hf-spaces/entrypoint.sh /app/entrypoint.sh
79
  RUN chmod +x /app/entrypoint.sh
80
 
81
  # 設置環境變數
@@ -98,5 +96,5 @@ EXPOSE 7860
98
  HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
99
  CMD curl -f http://localhost:7860/_stcore/health || exit 1
100
 
101
- # 啟動入口點
102
  ENTRYPOINT ["/app/entrypoint.sh"]
 
1
  # ============================================
2
  # CLIProxyAPI Plus - Hugging Face Spaces Dockerfile
3
  # ============================================
4
+ # Dockerfile 假設所有文件都在構建上下文根目錄
5
+ # 適合直接上傳 hf-spaces/ 內容到 HF Space
 
6
  # ============================================
7
 
8
  # ============================================
 
59
  && mkdir -p /root/.cli-proxy-api \
60
  && mkdir -p /app/logs
61
 
62
+ # 複製 Go 二進制文件(從構建階段)
63
  COPY --from=go-builder /build/CLIProxyAPIPlus /app/go-server/CLIProxyAPIPlus
 
64
 
65
+ # 複製 Streamlit 應用(文件在根目錄)
66
+ COPY streamlit_app/ /app/streamlit/
67
+ COPY requirements.txt /app/streamlit/
68
 
69
  # 安裝 Python 依賴
70
  RUN pip install --no-cache-dir -r /app/streamlit/requirements.txt
71
 
72
+ # 複製 Supervisor 配置(文件在根目錄)
73
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
74
 
75
+ # 複製啟動腳本(文件在根目錄)
76
+ COPY entrypoint.sh /app/entrypoint.sh
77
  RUN chmod +x /app/entrypoint.sh
78
 
79
  # 設置環境變數
 
96
  HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
97
  CMD curl -f http://localhost:7860/_stcore/health || exit 1
98
 
99
+ # 啟動容器
100
  ENTRYPOINT ["/app/entrypoint.sh"]