[model-gateway] fix gateway docker build due to recent py code change (#13532)

This commit is contained in:
Chang Su
2025-11-18 11:24:25 -08:00
committed by GitHub
parent f5566acc2a
commit b8e32e7965
3 changed files with 5 additions and 4 deletions

View File

@@ -26,5 +26,5 @@ jobs:
version=$(cat sgl-router/bindings/python/sglang_router/version.py | cut -d'"' -f2)
tag=v${version}
docker build . -f docker/router.Dockerfile -t lmsysorg/sglang-router:${tag} --no-cache
docker build . -f docker/gateway.Dockerfile -t lmsysorg/sglang-router:${tag} --no-cache
docker push lmsysorg/sglang-router:${tag}

View File

@@ -316,7 +316,7 @@ RUN --mount=type=cache,target=/root/.cache/pip curl --proto '=https' --tlsv1.2 -
&& export PATH="/root/.cargo/bin:${PATH}" \
&& rustc --version && cargo --version \
&& python3 -m pip install maturin \
&& cd /sgl-workspace/sglang/sgl-router \
&& cd /sgl-workspace/sglang/sgl-router/bindings/python \
&& ulimit -n 65536 && maturin build --release --features vendored-openssl --out dist \
&& python3 -m pip install --force-reinstall dist/*.whl \
&& rm -rf /root/.cargo /root/.rustup target dist ~/.cargo \

View File

@@ -57,7 +57,8 @@ WORKDIR /opt/sglang/sgl-router
# install maturin and build the wheel with vendored OpenSSL
RUN uv pip install maturin \
&& cargo clean \
&& rm -rf dist/ \
&& rm -rf bindings/python/dist/ \
&& cd bindings/python \
&& maturin build --release --features vendored-openssl --out dist \
&& rm -rf /root/.cache
@@ -65,7 +66,7 @@ RUN uv pip install maturin \
FROM base AS router-image
# Copy the built package from the build image
COPY --from=build-image /opt/sglang/sgl-router/dist/*.whl dist/
COPY --from=build-image /opt/sglang/sgl-router/bindings/python/dist/*.whl dist/
# Build the package and install
RUN uv pip install --force-reinstall dist/*.whl