WSL & Docker
Running Ubuntu with WSL ..
Last updated
Running Ubuntu with WSL ..
Last updated
Windows Subsystem for Linux (WSL) paired with Docker creates a powerful environment for working with Large Language Models. WSL provides a Linux-compatible kernel interface on Windows, allowing developers to run Linux tools directly alongside their Windows applications. When combined with Docker's containerization capabilities, this setup enables consistent deployment of LLM environments across different machines while isolating dependencies.
Docker containers package everything needed to run an LLM—from specific Python versions to specialized CUDA drivers for GPU acceleration—making it straightforward to deploy models like Llama, Mistral, or other open-source LLMs locally. This approach simplifies environment management, reduces "works on my machine" problems, and makes scaling from development to production more seamless, all while preserving Windows as your primary operating system.
Windows Subsystem for Linux () enables developers to run a GNU/Linux environment on Windows. The Ubuntu distribution for WSL is tightly integrated with the Windows OS, supporting features including remote development with popular IDEs and cross-OS file management.
Ubuntu on WSL provides a productive terminal environment that can also be used to launch Linux-native graphical applications.
There are multiple ways of installing distros on WSL:
Microsoft Store application
WSL commands run in the terminal
List available versions.
Install a version using a NAME from the output
You’ll see an indicator of the installation progress in the terminal.
Once completed you have access to the WSL subsystem.
Launch Unbuntu 24.04 LTS.
Enter username & password.
Close and open a new Terminal.
Check all your currently installed distros and the version of WSL.
Select Ubuntu 24.04 from the drop-down terminal.
2. Install the latest updates.
WSL doesn't connect to the internet from within the distro. The reason is because Windows automatically generates resolv.conf file with the wrong nameserver.
You may also need to stop WSL from resetting this file when opening future terminals
Check if you already have internet connectivity.
Check /etc/resolv.conf.
Create a proper resolv.conf.
Generate a new /etc/wsl.conf file. This will prevent the resolv.conf being recreated on each session.
Restart WSL.
CUDA (Compute Unified Device Architecture) is a parallel computing platform developed by NVIDIA. It provides an application programming interface (API) that enables developers to harness the immense processing power of NVIDIA graphics processing units () for general-purpose computing.
Remember to finish configuring the to use the Nvidia runtime.
Take your to the next level ..
Download for your host environment.