👉 Ref: Main tutorial from Microsoft.
# Eanble Windows Subsystem for Linux
# PowerShell as Admin
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# Enable Virtual Machine Platform (for WSL2)
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# restart required
# Download and install WSL2 Linux kernel update package for x64 machines
<https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi>
# Set WSL2 as default version
# PowerShell as Admin
wsl --set-default-version 2
# Go to Windows Store
# Choose a Linux Distro and install it
# After installing, run Ubuntu app from Start menu
# Follow the instruction on screen
# Update system
sudo apt update
sudo apt upgrade # be careful, it takes time!
# Install dependencies (it takes time)
sudo apt-get install git-core curl wget fontconfig zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
👉 Note: Linux 👉 Note: Fresh Ubuntu / Pop!_OS Installation 👉 Note: Bash (Unix Shell)
C
drive is located in /mnt/c/
./mnt/c/Users/dinha/Downloads/
.explorer.exe .
.Z
): click on Linux icon in Explorer > Right click on Ubuntu folder > "Map network drive.."I use cmder. Read more in this note.
# check if gpu available with docker on wsl2
docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
# should see something like this
> Windowed mode
> Simulation data stored in video memory
> Single precision floating point simulation
> 1 Devices used for simulation
GPU Device 0: "GeForce GTX 1070" with compute capability 6.1
> Compute 6.1 CUDA device: [GeForce GTX 1070]
15360 bodies, total time for 10 iterations: 11.949 ms
= 197.446 billion interactions per second
= 3948.925 single-precision GFLOP/s at 20 flops per interaction
👉 Check some tests in this section.