vLLM support broken on Windows with WSL2

Offen
#1,018 3 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
docker, python

Rechercherichtung

Beginne mit den gemeldeten Befehlen docker model install-runner --backend vllm --gpu cuda und docker model run, und vergleiche vLLM mit dem funktionierenden llama.cpp-Pfad und dem Runner-Image latest-vllm-cuda. Überprüfe den vLLM-Startfehler und die Dokumentationsseite zu inference-engines; als erledigt gilt die Aufgabe, wenn vLLM-Modelle unter Windows mit WSL2 ausgeführt werden und der dokumentierte Befehl nicht mehr für das ungültige Flag --backend wirbt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi,

I tried to follow the tutorial from https://www.docker.com/blog/docker-model-runner-vllm-windows/ for vLLM. Unfortunately it did not work, even after trying different models etc. It seems like vLLM support is completely broken on Windows, while models with the llama.cpp backend work fine.

Every vLLM model fails with this error:

ImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory

Below are more verbose logs from two different models I tried. Since it's exactly the same error and it's occuring before the model loads, I assume it's a docker model runner-runtime issue.

gemma3-vllm
>docker model run ai/gemma3-vllm "Say hello in one short sentence."
Unable to find model 'ai/gemma3-vllm' locally. Pulling from the server.
~snip~
Model pulled successfully
Failed to generate a response: error response: status=500 body=unable to load runner: error waiting for runner to be ready: vLLM terminated unexpectedly: vLLM failed:     module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/platforms/cuda.py", line 22, in <module>
    import vllm._C_stable_libtorch  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory
y", line 44, in is_pin_memory_available
    from vllm.platforms import current_platform
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/platforms/__init__.py", line 277, in __getattr__
    _current_platform = resolve_obj_by_qualname(platform_cls_qualname)()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/utils/import_utils.py", line 109, in resolve_obj_by_qualname

smollm2-vllm
> docker model run ai/smollm2-vllm "Tell me about Docker."
Failed to generate a response: error response: status=500 body=unable to load runner: error waiting for runner to be ready: vLLM terminated unexpectedly: vLLM failed:     module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/platforms/cuda.py", line 22, in <module>
    import vllm._C_stable_libtorch  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory
y", line 44, in is_pin_memory_available
    from vllm.platforms import current_platform
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/platforms/__init__.py", line 277, in __getattr__
    _current_platform = resolve_obj_by_qualname(platform_cls_qualname)()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm-env/lib/python3.12/site-packages/vllm/utils/import_utils.py", line 109, in resolve_obj_by_qualname

Meanwhile, models with llama work fine:

>docker model run ai/smollm2 "whatsupp?"
Hi, I'm here to help with your programming tasks, such as debugging, troubleshooting, and providing guidance on various programming languages and concepts. What's your question or issue?

Environment

  • Host OS: Windows 10 Pro, build 19045.7417
  • Docker context: desktop-linux
  • Docker Desktop: 4.82.0 (233772)
  • Docker Engine: 29.6.1, Linux amd64
  • Docker Model Runner client: v1.2.5
  • Docker Model Runner server: v1.2.6
  • Docker Desktop CLI plugin: v0.4.1
  • WSL: 2.7.10.0
  • WSL kernel: 6.18.33.2-2
  • Default WSL distribution: Ubuntu, version 2
  • GPU: NVIDIA GeForce RTX 4070 series, 12 GB VRAM
  • NVIDIA driver: 610.47
  • CUDA UMD version: 13.3
  • Model Runner vLLM version: 0.24.0
  • Runner image: docker/model-runner:latest-vllm-cuda
  • Runner image digest: sha256:105c9bc23f9546de54bb898298bce94aeb75b4ee9e558212ae6260de03c8957b
docker model status
> docker model status
Docker Model Runner is running

BACKEND    STATUS         DETAILS
llama.cpp  Running        llama.cpp 72874f559
vllm       Running        vllm 0.24.0
diffusers  Not Installed
mlx        Not Installed  only supported on Apple Silicon
sglang     Not Installed  package not installed
PS C:\Users\w>
GPU access works from Docker/WSL2:
docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi

This successfully reports the RTX 4070 GPU inside the Linux container.

Reproduction

docker model install-runner --backend vllm --gpu cuda
docker model status
docker model run ai/smollm2-vllm "Say hello in one short sentence."

Also reproduced with:

docker model run ai/gemma3-vllm "Say hello in one short sentence."

Btw, the documentation on this page has a hallucinated/invalid parameter: https://docs.docker.com/ai/model-runner/inference-engines/#running-models-with-vllm

--backend does not exist on docker model run.

> docker model run ai/gemma3-vllm --backend vllm
unknown flag: --backend

Usage:  docker model run MODEL [PROMPT]

Run 'docker model run --help' for more information

Output of help command does not list --backend either. I think it only exists for installing the runner backend, but not for explicitly choosing the backend when running a model.

> docker model run --help
Usage:  docker model run MODEL [PROMPT]

Run a model and interact with it using a submitted prompt or chat mode

Options:
      --color string       Use colored output (auto|yes|no) (default "no")
      --debug              Enable debug logging
  -d, --detach             Load the model in the background without
                           interaction
      --openaiurl string   OpenAI-compatible API endpoint URL to chat with
      --websearch          Enable web search tool during chat
Vorherrschende Sprache
Go
Sterne
665
Forks
161
Ø Merge
4 Std. 25 Min.
Gemergte PRs (30 T.)
18

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus docker/model-runner

Alle Issues in docker/model-runner

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.