- /v1/responses 双向翻译(含流式 response.* 事件、tools、usage 全字段) - /v1/chat/completions 字节级透传 - STOP_SCOPE=content 内容侧 stop(保思维链 + matched_stop 回填) - b300 docker 构建 + 孔明 kaniko 构建 + 两版 cw manifest
16 lines
690 B
Docker
16 lines
690 B
Docker
# 孔明 kmctl kaniko 构建(dockerfile 模式,无构建上下文)
|
|
# 不 COPY 本地文件,从 Gitee 匿名 clone 源码编译(与 sglang 的 build-kmctl/Dockerfile 同套路)。
|
|
# 用法: kmctl --cluster <集群> create image responses-shim --build-mode dockerfile \
|
|
# --dockerfile Dockerfile.kaniko --node-group <节点组> --wait
|
|
FROM uhub.service.ucloud.cn/umirror/golang:1.23 AS build
|
|
|
|
RUN git clone --depth 1 https://gitee.com/ymkymkymkymx/responses-shim.git /src \
|
|
&& cd /src \
|
|
&& CGO_ENABLED=0 go build -ldflags="-s -w" -o /shim . \
|
|
&& git rev-parse HEAD > /etc/shim-commit || true
|
|
|
|
FROM scratch
|
|
COPY --from=build /shim /shim
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/shim"]
|