Prerequisites
Before beginning installation, ensure you have:- Windows 11 (Windows 10 is not officially supported)
- NVIDIA GPU from one of these series:
- RTX 2000/3000 series
- Kepler/Tesla/Volta/Ampere series
Other GPU configurations are not guaranteed to work.
Installation
Install the GPU driver
Download and install the latest Game Ready drivers for your NVIDIA GPU from NVIDIA’s website.Select your GPU model from the dropdown menus, click “Search”, and follow the installation wizard.
Enable WSL2
Open Windows Terminal as an administrator:
- Search for “Terminal” in the Start menu
- Right click and select “Run as administrator”
Enable virtualization
In the same administrator terminal, run:If this command fails, enable virtualization capabilities in your computer’s BIOS/UEFI.A successful output will print
The operation completed successfully.Update the Linux kernel
Download and run the WSL2 Linux kernel update package for x64 machines.When prompted for elevated permissions, click ‘yes’ to approve.Verify the kernel version by opening Windows Terminal as administrator and running:You should see output like:
The kernel version should be at least
5.10.43.3. If it’s not, open Settings → Windows Update → Advanced options and enable “Receive updates for other Microsoft products”, then check for updates.Configure WSL 2 as default
Set WSL 2 as the default version in Windows Terminal with administrator privileges:
Install Ubuntu
Go to the Microsoft Store and download Ubuntu 18.04.Launch the “Ubuntu” app from your Start Menu and create a Linux user account when prompted.
Configure CUDA Toolkit
Open PowerShell or Windows Command Prompt in administrator mode and enter:This drops you into your Linux VM. Run the following commands to install the CUDA Toolkit for WSL-Ubuntu:
Install Docker Desktop
Download and install Docker Desktop for Windows.After installation:
- Run Docker Desktop
- Go to Settings → General
- Ensure Use the WSL 2 based engine is checked
- Click Apply & Restart
Running Your First Model
Test your setup by running a model:Processing the Output
If your model returns base64-encoded images, usejq to convert them:
Viewing Results
WSL 2 allows you to access Windows binaries with the.exe extension:
Troubleshooting
GPU not detected
If your GPU isn’t detected:- Verify NVIDIA drivers are installed on Windows (not in WSL)
- Check that virtualization is enabled in BIOS
- Ensure WSL 2 is the default version:
wsl --set-default-version 2
Docker errors
If Docker commands fail:- Verify Docker Desktop is running
- Check that WSL 2 backend is enabled in Docker settings
- Restart Docker Desktop
CUDA errors
References
- NVIDIA CUDA WSL User Guide
- NVIDIA CUDA Downloads
- Docker WSL 2 GPU Support
- WSL Installation Guide
- Cog GitHub Repository
Next Steps
- Learn about setting up your own model
- Explore deploying models to production
- See the cog.yaml reference for configuration options