https://notesbyair.github.io/blog/cs/2020-05-26-installing-multiple-versions-of-cuda-cudnn/
I already have Cuda on my WSL2:
@LAPTOP-DNCQ5AAC:/mnt/d/ai/llm/ng-video-lecture$ nvidia-smi
Sun Aug 13 16:22:37 2023
+---------------------------------------------+
| NVIDIA-SMI 525.116 Driver Version: 528.96 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 2W / 50W | 9MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+---------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 213 G /Xwayland N/A |
+---------------------------------------------+
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0
I am pretty sure I said "yes" to creating a symbolic link during installation.
Now to follow that blog at the url I posted above, how do I get rid of my Cuda symbolic link?
I need to install Cuda version 11.8 or 11.7 because I want to run PyTorch C++ on Cuda and they don't have a Cuda 12 version.
I found a command
@LAPTOP-DNCQ5AAC:/mnt/d/ai/llm/ng-video-lecture$ sudo find / -type l | grep libcuda
/home/nobu/miniconda3/envs/rapids-23.04/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/rapids-23.04/lib/libcudart.so
/home/nobu/miniconda3/envs/ldm/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/ldm/lib/libcudart.so
/home/nobu/miniconda3/envs/tf/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/tf/lib/libcudart.so
/home/nobu/miniconda3/envs/paddleocr/lib/libcudart.so.10.2
/home/nobu/miniconda3/envs/paddleocr/lib/libcudart.so
/home/nobu/miniconda3/envs/vision_transformer/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/vision_transformer/lib/libcudart.so
/home/nobu/miniconda3/envs/pytorch/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/pytorch/lib/libcudart.so
/home/nobu/miniconda3/envs/open-mmlab/lib/libcudart.so.11.0
/home/nobu/miniconda3/envs/open-mmlab/lib/libcudart.so
/home/nobu/miniconda3/pkgs/cudatoolkit-11.1.1-hb139c0e_12/lib/libcudart.so.11.0
/home/nobu/miniconda3/pkgs/cudatoolkit-11.1.1-hb139c0e_12/lib/libcudart.so
/home/nobu/miniconda3/pkgs/cudatoolkit-11.3.1-h2bc3f7f_2/lib/libcudart.so.11.0
/home/nobu/miniconda3/pkgs/cudatoolkit-11.3.1-h2bc3f7f_2/lib/libcudart.so
/home/nobu/miniconda3/pkgs/cudatoolkit-10.2.89-hfd86e86_1/lib/libcudart.so.10.2
/home/nobu/miniconda3/pkgs/cudatoolkit-10.2.89-hfd86e86_1/lib/libcudart.so
/home/nobu/miniconda3/pkgs/cudatoolkit-11.2.2-hbe64b41_11/lib/libcudart.so.11.0
/home/nobu/miniconda3/pkgs/cudatoolkit-11.2.2-hbe64b41_11/lib/libcudart.so
/home/nobu/miniconda3/pkgs/cudatoolkit-11.8.0-h37601d7_11/lib/libcudart.so.11.0
/home/nobu/miniconda3/pkgs/cudatoolkit-11.8.0-h37601d7_11/lib/libcudart.so
find: File system loop detected; ‘/mnt/wslg/distro’ is part of the same file system loop as ‘/’.
find: ‘/mnt/d/$RECYCLE.BIN/S-1-5-21-2207593063-2945772590-794792826-1001’: Permission denied
What's happening at the end there?
Edit: Thanks to @chan for advice on using multiple cudas.
I read this to install 11.8
How do I install NVIDIA and CUDA drivers into Ubuntu?
so basically at the installation menu I can skip the drivers but right now when I select Driver Options in that menu, I get a blank bash: