Skip to content

Instantly share code, notes, and snippets.

@adwellj
adwellj / Install CUDA for TensorFlow in WSL2 (Win 10).md
Last active February 19, 2024 23:05
Instructions for installing CUDA for TensorFlow 2.8 in Ubuntu 20.04 in WSL2 (Win 10 - 02/2022)

Confirm GPU access in WSL

In an Ubuntu terminal, enter nvidia-smi. If that fails, make sure your Nvidia drivers are up-to-date (current version: 511.23). Win10 version also needs to be at least 21H2 (Winkey + R then winver in Windows to check version).

Current versions of TF use CUDA 11.2 and cuDNN 8.1. Tested build configurations Run the below commands in a terminal:

wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda-repo-wsl-ubuntu-11-2-local_11.2.2-1_amd64.deb
@adwellj
adwellj / opencv4nodejs install.md
Last active January 28, 2023 09:52
Windows Global Install for opencv4nodejs

Installation

Start with node-gyp

You can install with npm:

$ npm install -g node-gyp