Xpu Container Run logo

Xpu Container Run

Organization
intel
xpu-container-run

Launch a Docker container with Intel GPU access on Linux. Encodes the correct combination of `--device /dev/dri`, render-group access, `--ipc=host`, `ZE_AFFINITY_MASK` pinning, Hugging Face cache mount, and `--entrypoint /bin/bash` for interactive use. Use when running any Intel-XPU container (vLLM-XPU, sglang-xpu, torch-XPU, llama.cpp SYCL, etc.) and the device must be visible inside. The CUDA analogue is `docker run --gpus all` — Intel has no `--gpus` flag, you pass the Direct Rendering Manager (DRM) nodes directly.

Overview

Publisherintel
Repositoryskills
Skill namexpu-container-run
Stars
31
Forks
14
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by intel on GitHub. Read the source before you install it.

Installation

Install the Xpu Container Run AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/intel/skills/tree/main/skills/xpu-container-run
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/xpu-container-run .claude/skills/xpu-container-run
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Xpu Container Run in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Xpu Container Run on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Xpu Container Run is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

xpu-container-run

Intel GPUs do not plug into Docker via --gpus all. There is no nvidia-container-toolkit equivalent. Pass the kernel's Direct Rendering Manager (DRM) character devices into the container and grant the right group ownership.

CUDA → Intel cheat sheet

CUDAIntel
docker run --gpus all--device /dev/dri --group-add "$(getent group render | cut -d: -f3)"
docker run --gpus '"device=0"'-e ZE_AFFINITY_MASK=0
--ipc=hostsame
--shm-size=16gsame (alternative to --ipc=host)
--runtime nvidianothing — xe/i915 is in-kernel
nvidia-smi inside containerxpu-smi discovery

No "Intel container toolkit" needed; passing the DRM nodes is enough.

Image source

Comes from the runner skill:

  • vLLM serving → vllm-xpu-run (vllm/vllm-openai-xpu:latest)
  • SGLang → sglang-xpu-run (lmsysorg/sglang:v<version>-xpu; that skill pins a validated tag — there is no latest-xpu)
  • PyTorch / Transformers → torch-xpu-run

<image> below is whichever you picked.

Quickstart — interactive shell, one GPU

Confirm the image name with the user before running — this binds host GPU devices into the container.

sh
docker run --rm -it \
    --device /dev/dri \
    --group-add "$(getent group render | cut -d: -f3)" \
    --ipc=host \
    -e ZE_AFFINITY_MASK=0 \
    -e HF_TOKEN="$HF_TOKEN" \
    -v "$HOME/.cache/huggingface:/root/.cache/huggingface" \
    --entrypoint /bin/bash \
    <image>
FlagWhy
--rm -itInteractive shell, removed on exit. -it needs a real terminal — from CI, an agent, or ssh host cmd, drop it (see Common errors).
--device /dev/driPass every Intel GPU's DRM nodes. Use --device /dev/dri/renderD128 for just the first GPU's render node (least privilege).
--group-add "$(getent group render | cut -d: -f3)"Joins the container user to the host's render group by GID (not name) so it works in images where a render group with a different GID — or no render group at all — exists. Required when nodes are mode 0660/0640. Skip causes EACCES on Level Zero init.
--ipc=hostvLLM and torch.distributed use /dev/shm and POSIX semaphores. --shm-size=16g is a private-IPC alternative.
-e ZE_AFFINITY_MASK=0Pin to GPU 0. See xpu-discover for IDs. Always set explicitly.
-v ~/.cache/huggingface:...Share the host model cache; avoid re-download.
--entrypoint /bin/bashOverride server-image autostart for interactive use.

When --privileged is needed

Exception, not rule. Required only for:

  • unitrace / VTune collectors that read PMU MSRs.
  • GPU firmware updates (xpu-smi updatefw).
  • xpu-smi diag --singletest 5 (PCIe bandwidth) and similar low-level diag tests.

For running models and most profiling, --device /dev/dri is enough. Add --privileged only when you hit a specific permission failure pointing at it.

Server mode, multi-GPU, --net=host

See references/server-and-multi-gpu.md for daemon-style server launches, one-process-per-GPU vs single-process TP / PP layouts, the oneCCL CCL_ZE_IPC_EXCHANGE=pidfd setting for multi-XPU TP, and when --net=host is actually needed.

Verifying the container sees the GPU

sh
xpu-smi discovery
SymptomCauseFix
xpu-smi: command not foundimage lacks xpu-smiuse a different image or skip this check
empty discovery tableno /dev/dri passedadd --device /dev/dri
Level Zero init failed / EACCESuser not in render groupadd `--group-add "$(getent group render
wrong GPU countZE_AFFINITY_MASK inherited from hostpass mask explicitly with -e
diag works on host, fails in containercontainer not privilegedadd --privileged, or skip diag inside container

Common errors

  • failed to create shim task: permission denied → container runtime can't open /dev/dri/card0. Add --privileged or check host file mode.
  • LIBZE_LOADER: Failed to load level-zero loader → image missing libze1 / intel-level-zero-gpu. Use a different image.
  • RuntimeError: Cannot find any XPU devices (PyTorch) → Level Zero loaded but no device visible. Re-check ZE_AFFINITY_MASK and run xpu-smi discovery in the container.
  • bus error early in vLLM/PyTorch startup → shared memory too small. Use --ipc=host or raise --shm-size.
  • the input device is not a TTY (newer Docker: cannot attach stdin to a TTY-enabled container because stdin is not a terminal) → -it needs a terminal; CI jobs, agents, and ssh host cmd have none. Drop -it and pass the command: docker run --rm ... --entrypoint /bin/bash <image> -c "<cmd>". For several steps, keep it alive instead — docker run -d --name <name> ... --entrypoint sleep <image> infinity — then docker exec <name> <cmd>.

Env vars

VariablePurpose
ZE_AFFINITY_MASKWhich XPU(s) visible.
HF_TOKENHugging Face auth.
HF_HOMEOverride in-container HF cache path.
HUGGINGFACE_HUB_CACHEOlder alias; some images still use it.
OMP_NUM_THREADSCap CPU threads; 1 for single-process serving.
CCL_ZE_IPC_EXCHANGE=pidfdMulti-GPU-friendly oneCCL IPC mechanism.
IGC_EnableAluBinding=1Battlemage matmul-codegen hint; bench both.
ONEAPI_DEVICE_SELECTOR=level_zero:0Belt-and-suspenders pin alongside ZE_AFFINITY_MASK.

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Xpu Container Run AI skill do?

Launch a Docker container with Intel GPU access on Linux. Encodes the correct combination of `--device /dev/dri`, render-group access, `--ipc=host`, `ZE_AFFINITY_MASK` pinning, Hugging Face cache mount, and `--entrypoint /bin/bash` for interactive use. Use when running any Intel-XPU container (vLLM-XPU, sglang-xpu, torch-XPU, llama.cpp SYCL, etc.) and the device must be visible inside. The CUDA analogue is `docker run --gpus all` — Intel has no `--gpus` flag, you pass the Direct Rendering Manager (DRM) nodes directly.

Why use Xpu Container Run on TypingMind?

Because you install it once and use it with any model. Xpu Container Run is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Xpu Container Run in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/intel/skills/tree/main/skills/xpu-container-run. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Xpu Container Run?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Xpu Container Run?

As many as you like. As long as a model supports skills, you can use Xpu Container Run with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Xpu Container Run AI skill free?

Yes. It is published on GitHub by intel under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇