Skip to content

Commit 7e035f4

Browse files
committed
[XPU] Add XPU Dockerfile and related docs
Signed-off-by: Yan Ma <yan.ma@intel.com>
1 parent 47b11c6 commit 7e035f4

File tree

4 files changed

+100
-1
lines changed

4 files changed

+100
-1
lines changed

docker/Dockerfile.xpu

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG BASE_IMAGE=gar-registry.caas.intel.com/pytorch/pytorch-ipex-spr:multi-bmg_release_2601_py2.10_ww2605.5
2+
FROM ${BASE_IMAGE} AS final
3+
4+
ARG COMMON_WORKDIR=/workspace
5+
6+
WORKDIR ${COMMON_WORKDIR}
7+
8+
RUN mkdir -p ${COMMON_WORKDIR}/vllm-omni
9+
10+
COPY . ${COMMON_WORKDIR}/vllm-omni
11+
12+
RUN cd ${COMMON_WORKDIR}/vllm-omni && python -m pip install --no-cache-dir ".[dev]" --no-build-isolation
13+
14+
# FIX triton
15+
RUN --mount=type=cache,target=/root/.cache/pip pip uninstall triton triton-xpu -y && pip install triton-xpu==3.6.0 --extra-index-url=https://download.pytorch.org/whl/test/xpu
16+
17+
RUN ln -sf /usr/bin/python3 /usr/bin/python
18+
19+
CMD ["/bin/bash"]
20+
21+
ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
22+
23+
ENTRYPOINT []
24+
25+
#Set entrypoint for vllm-openai official images
26+
FROM final AS vllm-openai
27+
RUN cd ${COMMON_WORKDIR}/vllm-omni
28+
ENTRYPOINT ["vllm", "serve", "--omni"]

docs/getting_started/installation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ vLLM-Omni supports the following hardware platforms:
55
- [GPU](gpu.md)
66
- [NVIDIA CUDA](gpu.md)
77
- [AMD ROCm](gpu.md)
8+
- [Intel XPU](gpu.md)
89
- [NPU](npu.md)

docs/getting_started/installation/gpu.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ vLLM-Omni is a Python library that supports the following GPU variants. The libr
1818

1919
--8<-- "docs/getting_started/installation/gpu/rocm.inc.md:requirements"
2020

21+
=== "Intel XPU"
22+
23+
--8<-- "docs/getting_started/installation/gpu/xpu.inc.md:requirements"
24+
2125
## Set up using Python
2226

2327
### Create a new Python environment
@@ -30,11 +34,14 @@ vLLM-Omni is a Python library that supports the following GPU variants. The libr
3034

3135
--8<-- "docs/getting_started/installation/gpu/cuda.inc.md:pre-built-wheels"
3236

33-
3437
=== "AMD ROCm"
3538

3639
--8<-- "docs/getting_started/installation/gpu/rocm.inc.md:pre-built-wheels"
3740

41+
=== "Intel XPU"
42+
43+
--8<-- "docs/getting_started/installation/gpu/xpu.inc.md:pre-built-wheels"
44+
3845
[](){ #build-from-source }
3946

4047
### Build wheel from source
@@ -47,6 +54,10 @@ vLLM-Omni is a Python library that supports the following GPU variants. The libr
4754

4855
--8<-- "docs/getting_started/installation/gpu/rocm.inc.md:build-wheel-from-source"
4956

57+
=== "Intel XPU"
58+
59+
--8<-- "docs/getting_started/installation/gpu/xpu.inc.md:build-wheel-from-source"
60+
5061
## Set up using Docker
5162

5263
### Pre-built images
@@ -59,8 +70,17 @@ vLLM-Omni is a Python library that supports the following GPU variants. The libr
5970

6071
--8<-- "docs/getting_started/installation/gpu/rocm.inc.md:pre-built-images"
6172

73+
=== "Intel XPU"
74+
75+
--8<-- "docs/getting_started/installation/gpu/xpu.inc.md:pre-built-images"
76+
6277
### Build your own docker image
6378

6479
=== "AMD ROCm"
6580

6681
--8<-- "docs/getting_started/installation/gpu/rocm.inc.md:build-docker"
82+
83+
=== "Intel XPU"
84+
85+
--8<-- "docs/getting_started/installation/gpu/xpu.inc.md:build-docker"
86+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --8<-- [start:requirements]
2+
3+
- GPU: Validated on Intel® Arc™ B-Series (It should be supported on the AMD GPUs that are supported by vLLM.)
4+
5+
# --8<-- [end:requirements]
6+
# --8<-- [start:set-up-using-python]
7+
8+
vLLM-Omni current recommends the steps in under setup through Docker Images.
9+
10+
# --8<-- [start:pre-built-wheels]
11+
12+
# --8<-- [end:pre-built-wheels]
13+
14+
# --8<-- [start:build-wheel-from-source]
15+
16+
# --8<-- [end:build-wheel-from-source]
17+
18+
# --8<-- [start:build-docker]
19+
20+
#### Build docker image
21+
22+
```bash
23+
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.xpu -t vllm-omni-xpu --shm-size=4g .
24+
```
25+
26+
#### Launch the docker image
27+
28+
##### Launch with OpenAI API Server
29+
30+
```
31+
docker run -it -d --shm-size 10g \
32+
--name {container_name} \
33+
--net=host \
34+
--ipc=host \
35+
--privileged \
36+
-v /dev/dri/by-path:/dev/dri/by-path \
37+
--device /dev/dri:/dev/dri \
38+
-v ~/.cache/huggingface:/root/.cache/huggingface \
39+
--env "HF_TOKEN=$HF_TOKEN" \
40+
-p 8091:8091 \
41+
vllm-omni-xpu \
42+
--model Qwen/Qwen2.5-Omni-3B --port 8091
43+
```
44+
45+
# --8<-- [end:build-docker]
46+
47+
# --8<-- [start:pre-built-images]
48+
49+
# --8<-- [end:pre-built-images]
50+

0 commit comments

Comments
 (0)