My WSL2 instance disappears within seconds of launching a GPU-based LLM program in python

Robert Douglas Sharp 0 Reputation points

After over a year of problem free GPU training in WSL2, now when I launch my GPU-based python scripts, the WSL instance dies within a few seconds, and seems to leave no events or logs behind as it dies...

I have reinstalled a brand new Ubuntu instance with only the minimal installs required to faciliate my GPU-based LLM use case, and this instance dies in exactly the same way as my original instance did.

Unless I can resolve this, I will need to switch to running Linux bare metal rather than Windows/WSL2... I contacted MSFT support, demonstrated the issue, and was reommended to ask a question here as they were unable to help.

I am running a slightly modified version of FastChat ("") using a fine-tuned model based on Facebooks LLama2 7B state model, and simply running the model with test prompts. This causes the WSL2 instance to die dependably every time.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,041 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 42,306 Reputation points

    Hello there,

    Given your wsl -l -v output, it looks like the docker-desktop-data instance got set as the default when you uninstalled Ubuntu. That's not actually a bootable instance, since it has no /init in it.

    That hopefully will explain why the wsl command is exiting. Just running wsl.exe (from PowerShell, CMD, or the Start Menu) is attempting to launch docker-desktop-data and then immediately exits.

    You should be able to fix it by executing wsl --set-default Ubuntu from PowerShell or CMD. If not, we can dig deeper.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments