Skip to content

Commit 0015d67

Browse files
authored
Update Dockerfile and documentation for Intel oneAPI environment initialization (#119)
* Update Dockerfile * Update README.md
1 parent d2183e0 commit 0015d67

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

vllm/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,26 @@ This way, only the first GPU will be mapped into the Docker container.
182182

183183
---
184184

185+
**Note — Intel oneAPI Environment**
186+
> How you start the container determines whether you need to manually source the Intel oneAPI environment (`source /opt/intel/oneapi/setvars.sh --force`):
187+
>
188+
> * **Interactive shell (`docker exec -it <container> bash`)**
189+
> `/root/.bashrc` already sources the oneAPI environment. No manual action needed.
190+
>
191+
> * **Docker Compose, overridden ENTRYPOINT, or direct `docker run` without interactive bash**
192+
> The environment is **not automatically loaded** if no shell is involved. Prepend your command with `source /opt/intel/oneapi/setvars.sh --force &&` to ensure proper GPU/XPU setup.
193+
>
194+
> ```yaml
195+
> entrypoint: >
196+
> entrypoint: source /opt/intel/oneapi/setvars.sh --force && python3 -m vllm.entrypoints.openai.api_server --model /llm/models/Qwen3-14B
197+
> ```
198+
>
199+
> **Summary:** Automated starts require sourcing the oneAPI script; interactive bash sessions are ready to use.
200+
201+
---
202+
203+
204+
185205
### 1.4 Launching the Serving Service
186206
187207
```bash

vllm/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,5 @@ RUN pip uninstall oneccl oneccl-devel -y
134134
RUN cd /llm/vllm && \
135135
python3 -m pip install -e tests/vllm_test_utils
136136

137-
ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"]
137+
ENTRYPOINT ["bash", "-c", "source /opt/intel/oneapi/setvars.sh --force && python3 -m vllm.entrypoints.openai.api_server"]
138+

0 commit comments

Comments
 (0)