chore(部署): 保存现有模型镜像配置调整

默认镜像安装 guard 依赖并启用离线模式,移除独立模型 Dockerfile,保留现有配置调整。
This commit is contained in:
starrrLight committed 2026-10-13 16:39:54 +08:00
1 parent d93cf2d5e5
commit fd71fc4063
3 files changed
+6 -13

No files matched your search

+5 -1
View File
@@ -2,9 +2,13 @@ FROM python:3.14-slim
WORKDIR /service
COPY pyproject.toml ./
COPY middleware ./middleware
RUN pip install --no-cache-dir .
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple \
--trusted-host pypi.tuna.tsinghua.edu.cn \
--default-timeout=60 --no-cache-dir \
".[guard]"
COPY config.yaml ./
COPY plugins ./plugins
ENV HF_HUB_OFFLINE=1
USER 65532:65532
EXPOSE 8080
CMD ["agent-safe-middleware", "--config", "/service/config.yaml"]
-11
View File
@@ -1,11 +0,0 @@
FROM python:3.13-slim
WORKDIR /service
COPY pyproject.toml ./
COPY middleware ./middleware
RUN pip install --no-cache-dir ".[guard]"
COPY config.yaml ./
COPY plugins ./plugins
ENV HF_HUB_OFFLINE=1
USER 65532:65532
EXPOSE 8080
CMD ["agent-safe-middleware", "--config", "/service/config.yaml"]
+1 -1
View File
@@ -4,7 +4,7 @@ listen_port: 8080
limits:
max_sessions: 4
hook_timeout_seconds: 60 # guard 模型 CPU 推理慢,默认 5s 不够
hook_timeout_seconds: 60
upstream_timeout_seconds: 120
llm: