Dual-booting Windows 10/11 and Ubuntu is still the preferred method for power users, but for regular folk like me I think using the new WSL (Windows Subsystem for Linux) is totally serviceable. It makes it so much easier to multi-task since you can operate within both ecosystems at the same time. I tried a number of different methods to get everything running online (mainly trying to figure out CUDA), but nothing worked. I finally found these steps to work. This assumes you already have Windows 11 and Windows CUDA drivers installed….
- Install WSL from Windows Store (see here: https://docs.microsoft.com/en-us/windows/wsl/install) Does not appear to work correctly from terminal. Must use Store.
- Install Ubuntu from Windows Store
- sudo apt update && sudo apt upgrade -y # upgrades Ubuntu
- sudo apt install python3-pip python3-dev # Installs pip and python header files
- sudo -H pip3 install –upgrade pip # Upgrades pip to latest version. -H flag ensures security policy sets the home environment variable to the home directory of the target user
- sudo -H pip3 install virtualenv # Installs virtualenv
- mkdir ~/PROJ # makes project directory
- cd ~/PROJ # changes to the project directory
- virtualenv asdf # creates a directory called “asdf” within ~/PROJ, installs a local version of Python and a local version of pip.
- source asdf/bin/activate # activates the environment, will change the prompt to show that you’re in
- pip install jupyter # Installs Jupyter. Note that the local version of pip3 is called “pip” in the virtual environment.
- jupyter notebook # runs the jupyter notebook
- nvidia-smi # From bash, test your GPU and see CUDA version