[XPU] upgrade sglang xpu backend to PyTorch 2.13 (#31751)

Co-authored-by: MingxuZh <109504044+MingxuZh@users.noreply.github.com>
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
yuchengliu1
2026-08-17 18:29:15 +08:00
committed by GitHub
co-authored by MingxuZh Ma Mingfei
parent c82e928fe5
commit 744740dbea
5 changed files with 56 additions and 25 deletions
+8 -7
View File
@@ -1,7 +1,7 @@
# docker build -t sglang:xpu -f xpu.Dockerfile --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy} --no-cache .
# Use Intel deep learning essentials base image with Ubuntu 24.04
FROM intel/deep-learning-essentials:2025.3.2-0-devel-ubuntu24.04
FROM intel/deep-learning-essentials:2026.0.0-devel-ubuntu24.04
# Avoid interactive prompts during package install
ENV DEBIAN_FRONTEND=noninteractive
@@ -19,9 +19,10 @@ USER root
# Pin Level-Zero UMD + IGC (rolling PPA once faulted libze on B580; see sgl-kernel-xpu#296).
# Keep in lockstep with the host xe KMD; override via --build-arg.
ARG COMPUTE_RUNTIME_VERSION=26.05.37020.3
ARG IGC_VERSION=2.28.4+20760
ARG GMM_VERSION=22.9.0
ARG COMPUTE_RUNTIME_VERSION=26.18.38308.1
ARG IGC_VERSION=2.34.4+21428
ARG GMM_VERSION=22.10.0
RUN apt-get update && apt-get install -y software-properties-common curl && \
add-apt-repository -y ppa:kobuk-team/intel-graphics && \
apt-get update && \
@@ -68,14 +69,14 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /sgl-workspace
RUN pip install --no-cache-dir msgspec blake3 py-cpuinfo compressed_tensors gguf partial_json_parser einops tabulate --root-user-action=ignore && \
pip install --no-cache-dir torch==2.12.0+xpu torchvision==0.27.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
RUN pip install --no-cache-dir torch==2.13.0+xpu torchvision==0.28.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu && \
pip install --no-cache-dir msgspec blake3 py-cpuinfo compressed_tensors gguf partial_json_parser einops tabulate --root-user-action=ignore
RUN echo "Cloning ${SG_LANG_BRANCH} from ${SG_LANG_REPO}" && \
git clone --branch ${SG_LANG_BRANCH} --single-branch ${SG_LANG_REPO} sglang && \
cd sglang && cd python && \
cp pyproject_xpu.toml pyproject.toml && \
pip install --no-cache-dir . --extra-index-url https://download.pytorch.org/whl/xpu && \
pip install --no-cache-dir ".[dev,diffusion]" --extra-index-url https://download.pytorch.org/whl/xpu && \
pip install --no-cache-dir --no-deps xgrammar==0.1.33
CMD ["bash", "-c", "source /opt/intel/oneapi/setvars.sh --force && exec bash"]