Skip to content

Getting Started ‐ WSL (Windows Subsystem for Linux) with NVIDIA

Michael Staake edited this page Jun 5, 2026 · 1 revision

LmPanel Setup Guide: WSL2 + Ubuntu 26.04 + NVIDIA GPU

This guide walks you through setting up LmPanel with NVIDIA GPU support using WSL2 and Ubuntu 26.04.

1. Install WSL and Ubuntu (Windows)

Run the following commands in your Windows PowerShell or Command Prompt:

# Install WSL (you'll need to reboot afterward) 
wsl --install

# Install Ubuntu 26.04
wsl --install Ubuntu-26.04

# Set as default
wsl --set-default Ubuntu-26.04

# Enter Ubuntu
wsl -d Ubuntu-26.04

2. Ubuntu Initial Setup & CUDA Installation

Run these commands inside your newly opened Ubuntu terminal:

Note: Ensure you are in the correct folder. You should be in your user directory or a subdirectory thereof. For example michael@michaelworkstation:/mnt/c/Users/Michael$. If you see something else, use cd to move to the correct directory.

# Update system
sudo apt update && sudo apt upgrade -y

# Install CUDA keyring
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb

# Update and install CUDA Toolkit
sudo apt update
sudo apt install cuda-toolkit -y

# Add CUDA to PATH
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

# Verify GPU detection
nvidia-smi

Note: If nvidia-smi successfully displays your NVIDIA graphics card details, you are ready to continue to the next step.

3. Install Docker

# Install prerequisites
sudo apt install ca-certificates curl gnupg lsb-release -y

# Create keyrings directory
sudo install -m 0755 -d /etc/apt/keyrings

# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y

# Add user to docker group
sudo usermod -aG docker $USER

# Apply group change
newgrp docker

# Enable and start Docker service
sudo systemctl enable --now docker

4. Install NVIDIA Container Toolkit

# Add NVIDIA Container Toolkit repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
  sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt update
sudo apt install -y nvidia-container-toolkit

First, step out of Ubuntu to restart WSL and cleanly apply the docker group changes:

# Leave the Ubuntu environment
exit

Now, run this in your Windows PowerShell/Command Prompt to reboot the WSL instance:

# Reboot your Ubuntu instance
wsl --shutdown
wsl -d Ubuntu-26.04

Once you are back in Ubuntu, run the following to configure the runtime:

# Configure Docker for NVIDIA
sudo nvidia-ctk runtime configure --runtime=docker

# Restart Docker
sudo systemctl restart docker

5. Install LmPanel

# Create directory and clone repository
git clone https://github.com/michaelstaake/LmPanel.git
cd LmPanel

# Copy environment file
cp .env.example .env

# Start LmPanel (with NVIDIA support)
docker compose --profile nvidia up -d --build

6. Usage

Access LmPanel: Open https://localhost:8443/ in your web browser.

Stop LmPanel: Run docker compose --profile nvidia down from the project directory.

Update LmPanel: Run git pull to pull down the latest changes.

7. Get Models

Browse HF for GGUF models and enjoy exploring!

https://huggingface.co/models?library=gguf&sort=trending