[model-gateway] fix gateway docker build due to recent py code change (#13532)
This commit is contained in:
@@ -26,5 +26,5 @@ jobs:
|
|||||||
version=$(cat sgl-router/bindings/python/sglang_router/version.py | cut -d'"' -f2)
|
version=$(cat sgl-router/bindings/python/sglang_router/version.py | cut -d'"' -f2)
|
||||||
tag=v${version}
|
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}
|
docker push lmsysorg/sglang-router:${tag}
|
||||||
|
|||||||
+1
-1
@@ -316,7 +316,7 @@ RUN --mount=type=cache,target=/root/.cache/pip curl --proto '=https' --tlsv1.2 -
|
|||||||
&& export PATH="/root/.cargo/bin:${PATH}" \
|
&& export PATH="/root/.cargo/bin:${PATH}" \
|
||||||
&& rustc --version && cargo --version \
|
&& rustc --version && cargo --version \
|
||||||
&& python3 -m pip install maturin \
|
&& 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 \
|
&& ulimit -n 65536 && maturin build --release --features vendored-openssl --out dist \
|
||||||
&& python3 -m pip install --force-reinstall dist/*.whl \
|
&& python3 -m pip install --force-reinstall dist/*.whl \
|
||||||
&& rm -rf /root/.cargo /root/.rustup target dist ~/.cargo \
|
&& rm -rf /root/.cargo /root/.rustup target dist ~/.cargo \
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ WORKDIR /opt/sglang/sgl-router
|
|||||||
# install maturin and build the wheel with vendored OpenSSL
|
# install maturin and build the wheel with vendored OpenSSL
|
||||||
RUN uv pip install maturin \
|
RUN uv pip install maturin \
|
||||||
&& cargo clean \
|
&& cargo clean \
|
||||||
&& rm -rf dist/ \
|
&& rm -rf bindings/python/dist/ \
|
||||||
|
&& cd bindings/python \
|
||||||
&& maturin build --release --features vendored-openssl --out dist \
|
&& maturin build --release --features vendored-openssl --out dist \
|
||||||
&& rm -rf /root/.cache
|
&& rm -rf /root/.cache
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ RUN uv pip install maturin \
|
|||||||
FROM base AS router-image
|
FROM base AS router-image
|
||||||
|
|
||||||
# Copy the built package from the build 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
|
# Build the package and install
|
||||||
RUN uv pip install --force-reinstall dist/*.whl
|
RUN uv pip install --force-reinstall dist/*.whl
|
||||||
Reference in New Issue
Block a user