The Ultimate Guide For Basic Personal WSL DL Env Development

update: 2025-08-31
Author: msrtea7

Simplified tensorflow gpu dev env

First, make sure NVIDIA driver is installed and works good, check through command nvidia-smi .

Then install wsl —> full doc link, here I use ubuntu.

# List of distros could be installed
wsl --list --online

# Install
wsl --install -d Ubuntu-24.04

In file explorer, find the WSL file system at \\wsl$\Ubuntu\home\USERNAME

Double ckeck nvidia-smi under WSL terminal session. Install uv and setting up tf-gpu as followed:

uv init
source .venv/bin/activate
uv add tensorflow[and-cuda]

Old version with SSH & network config

pubdata: 2024-03-01
Author: msrtea7

此刻是二零二四年三月一日凌晨一点四十分,我的心情无比沉重且轻盈,我将写下这篇文档以在将来帮助自己或有需要的人。

Fuck Windows, 灾难级。

配置 Windows

  1. 重装电脑。

  2. 主机基本配置

  1. 主机安装NVIDIA driver

配置 WSL

  1. WSL基本配置(默认宿主机win11,WSL2;其他环境自行解决)
  1. WSL 配置DL开发环境,以安装tensorflow gpu版本为例

SSH

apt install openssh-server
apt install build-essential

VSCODE

安装vscode参考自文档:https://dev.to/abbazs/how-to-install-vscode-in-ubuntu-using-apt-get-2m8o

  1. Download the Microsoft GPG key: Run the following command to download the Microsoft GPG key and save it as microsoft.gpg: curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

  2. Install the GPG key: Run the following command to install the GPG key into the trusted keyring: sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

  3. Add the VSCode and Microsoft Edge repositories: Run the following commands to add the VSCode and Microsoft Edge repositories to the system: sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list' sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'

  4. Remove the downloaded GPG key: Run the following command to remove the microsoft.gpg file: sudo rm microsoft.gpg

  5. Update package information: Run the following command to update the package information from the repositories: sudo apt update

  6. Install VSCode: Run the following command to install Visual Studio Code: sudo apt install -y code

  7. (Optional) Install with aptitude: If you use aptitude package manager, you can run the following commands instead of step 6 to install VSCode: sudo aptitude update sudo aptitude install -y code