Enable CodeGen deployment for Intel Arc Pro B-series GPU (XPU)#2467
Enable CodeGen deployment for Intel Arc Pro B-series GPU (XPU)#2467tintisimone wants to merge 1 commit into
Conversation
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an Intel Arc (XPU) Docker Compose deployment option for the CodeGen example, including environment setup scripts, validation/testing helpers, and detailed deployment documentation.
Changes:
- Introduces a new
intel/xpu/arcDocker Compose stack (compose + env script) for running CodeGen with Intel vLLM (XPU). - Adds helper scripts to validate configuration and check deployment readiness.
- Adds multiple docs (README/quick start/test summaries) and links the new guide from
CodeGen/README.md.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| CodeGen/docker_compose/intel/xpu/arc/validate_config.sh | New config validation script (env, GPU device, YAML, summary output). |
| CodeGen/docker_compose/intel/xpu/arc/test_deployment.sh | New deployment readiness checker for docker compose configuration. |
| CodeGen/docker_compose/intel/xpu/arc/set_env.sh | New environment variable setup for Arc/XPU docker compose deployment. |
| CodeGen/docker_compose/intel/xpu/arc/compose.yaml | New compose stack for vLLM (XPU) + llm server + backend + UI. |
| CodeGen/docker_compose/intel/xpu/arc/README.md | Full Arc/XPU deployment guide. |
| CodeGen/docker_compose/intel/xpu/arc/QUICK_START.md | Short quick-start instructions and common commands. |
| CodeGen/docker_compose/intel/xpu/arc/TEST_RESULTS.md | Captures validation/test results for the configuration. |
| CodeGen/docker_compose/intel/xpu/arc/DEPLOYMENT_TEST_SUMMARY.md | Extended narrative of configuration validation steps/results. |
| CodeGen/docker_compose/intel/xpu/arc/DEPLOYMENT_SUCCESS.md | Deployment success report and usage examples. |
| CodeGen/docker_compose/intel/xpu/arc/.gitignore | Ignores the model cache directory. |
| CodeGen/README.md | Adds Arc/XPU guide link + validated configuration row. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [ -d "/dev/dri" ]; then | ||
| ls -la /dev/dri/ | grep -E "card|render" | ||
| echo " ✓ Intel GPU devices found" | ||
| else | ||
| echo " ✗ /dev/dri not found - Intel GPU may not be available" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Fixed in d7d5d1e. Wrapped in a single conditional so set -e no longer aborts on a no-match: if [ -d "/dev/dri" ] && ls -la /dev/dri/ | grep -qE "card|render"; then.
| if command -v python3 &> /dev/null; then | ||
| python3 -c "import yaml; yaml.safe_load(open('compose.yaml'))" 2>&1 | ||
| if [ $? -eq 0 ]; then | ||
| echo " ✓ compose.yaml syntax is valid" | ||
| else | ||
| echo " ✗ compose.yaml has syntax errors" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Fixed in d7d5d1e. Restructured to if python3 -c "..."; then ... else ... fi so the YAML-validation failure branch runs instead of the script exiting under set -e.
| if [ -z "$HF_TOKEN" ]; then | ||
| echo " ✗ HF_TOKEN not set" | ||
| exit 1 | ||
| else | ||
| echo " ✓ HF_TOKEN: ${HF_TOKEN:0:10}..." | ||
| fi |
There was a problem hiding this comment.
Fixed in d7d5d1e. No longer prints any part of the token — now reports ✓ HF_TOKEN is set (${#HF_TOKEN} characters).
| $COMPOSE_CMD config > /dev/null 2>&1 | ||
| if [ $? -eq 0 ]; then | ||
| echo " ✓ Docker Compose configuration is valid" | ||
| else | ||
| echo " ✗ Docker Compose configuration has errors" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Fixed in d7d5d1e. Now if $COMPOSE_CMD config > /dev/null 2>&1; then ... else ... fi so the error message shows instead of aborting under set -e.
| if [ -d "/dev/dri" ]; then | ||
| ls -la /dev/dri/ | grep -E "card|render" | ||
| echo " ✓ Intel GPU devices found" | ||
| else | ||
| echo " ✗ /dev/dri not found - Intel GPU may not be available" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Fixed in d7d5d1e, same pattern as validate_config.sh: if [ -d "/dev/dri" ] && ls -la /dev/dri/ | grep -qE "card|render"; then.
| devices: | ||
| - /dev/dri:/dev/dri | ||
| privileged: true |
There was a problem hiding this comment.
Fixed in d7d5d1e. Dropped privileged: true in favor of least-privilege group_add (video/render groups) alongside the /dev/dri device mapping — same approach as the EdgeCraftRAG Intel Arc deployment. set_env.sh auto-detects the host VIDEOGROUPID/RENDERGROUPID with sane fallbacks.
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"] |
There was a problem hiding this comment.
Fixed in d7d5d1e. Healthcheck now uses python3 (guaranteed present in the vLLM image) instead of curl, so a missing curl can no longer leave the container unhealthy and block depends_on.
|
|
||
| ### Step 1: Setup Environment (1 minute) | ||
| ```bash | ||
| cd /home/gta/GenAIExamples/CodeGen/docker_compose/intel/xpu/arc |
There was a problem hiding this comment.
Fixed in d7d5d1e. Replaced the hard-coded /home/gta/... path with a repo-relative cd and swapped all your_host_ip placeholders for ${HOST_IP}.
|
|
||
| ### Test 1: Health Check | ||
| ```bash | ||
| curl http://your_host_ip:8028/health |
There was a problem hiding this comment.
Fixed in d7d5d1e (same as above): repo-relative path and ${HOST_IP} throughout QUICK_START.md.
| 1. **Port Conflict Resolution**: Successfully changed LLM service port from 9000 to 9001 | ||
| 2. **.env File Requirement**: Docker Compose requires .env file for proper variable expansion |
There was a problem hiding this comment.
Addressed in d7d5d1e by removing DEPLOYMENT_SUCCESS.md entirely — it was a machine-specific validation report that didn't match the other CodeGen deployment guides, so the misleading .env note is gone with it.
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Add Intel XPU support for CodeGen example with vLLM optimization. Features: - Intel vLLM 0.14.1-xpu Docker image with XPU-specific configuration - XPU environment variables (VLLM_TARGET_DEVICE, ZE_FLAT_DEVICE_HIERARCHY, ONEAPI_DEVICE_SELECTOR) - GPU device mounting (/dev/dri) with privileged mode - 10GB shared memory allocation for model inference - Full stack deployment: vLLM -> LLM Service -> Backend -> UI - Qwen/Qwen2.5-Coder-7B-Instruct model support Configuration files: - compose.yaml: Docker Compose with XPU optimizations - set_env.sh: Environment setup script - README.md: Comprehensive deployment documentation - QUICK_START.md: Quick reference guide - Validation and testing scripts Changes: - Added CodeGen/docker_compose/intel/xpu/arc/ directory structure - Updated CodeGen/README.md with Intel Arc GPU deployment option - Consistent with Intel CPU example deployment pattern Tested and validated on Intel Arc Pro B-series GPU. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: tintisimone <simone.tinti@intel.com>
50e592f to
d7d5d1e
Compare
|
Thanks for the review! I've pushed an update (rebased with DCO sign-off) that addresses the Copilot feedback and refreshes this PR (it was flagged stale). Changescompose.yaml
set_env.sh
validate_config.sh / test_deployment.sh
Docs (README.md / QUICK_START.md)
CI note
@lvliang-intel @yao531441 — could you take a look when you have a chance? Thanks! |
Add Intel XPU support for CodeGen example with vLLM optimization.
Features:
Configuration files:
Changes:
Tested and validated on Intel Arc Pro B-series GPU.
Description
The summary of the proposed changes as long as the relevant motivation and context.
Issues
List the issue or RFC link this PR is working on. If there is no such link, please mark it as
n/a.Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
List the newly introduced 3rd party dependency if exists.
Tests
Describe the tests that you ran to verify your changes.