feat: publish workphone SDK deployment and API docs
This commit is contained in:
31
sdk/Dockerfile
Normal file
31
sdk/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
# 工作手机SDK v3.1 - Dockerfile(含 AI Brain + Hook 模块管理)
|
||||
ARG PYTHON_IMAGE=docker.1ms.run/library/python:3.11-slim
|
||||
FROM ${PYTHON_IMAGE}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN sed -i 's#deb.debian.org#mirrors.cloud.tencent.com#g; s#security.debian.org#mirrors.cloud.tencent.com#g' /etc/apt/sources.list.d/debian.sources \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
adb \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
COPY app/ /app/
|
||||
# Hook 主控依赖的设备端代码(FridaManager / wechat_hook_v2.js 等)
|
||||
COPY agent/ /app/agent/
|
||||
ENV PYTHONPATH=/app:/app/agent
|
||||
|
||||
ENV ENV=production \
|
||||
AI_BRAIN_ENABLED=true \
|
||||
AI_BRAIN_API_URL=http://host.docker.internal:3102 \
|
||||
AI_BRAIN_DEFAULT_MODEL=auto
|
||||
|
||||
EXPOSE 8899
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
||||
CMD curl -f http://localhost:8899/health || exit 1
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8899"]
|
||||
Reference in New Issue
Block a user