Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christophe-foyer/darknet_wsl_cuda_install_scripts
Install scripts for Darknet and OpenCV with CUDA support on WSL
https://github.com/christophe-foyer/darknet_wsl_cuda_install_scripts
cuda darknet opencv wsl wsl2
Last synced: 18 days ago
JSON representation
Install scripts for Darknet and OpenCV with CUDA support on WSL
- Host: GitHub
- URL: https://github.com/christophe-foyer/darknet_wsl_cuda_install_scripts
- Owner: Christophe-Foyer
- Created: 2021-03-10T15:46:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-07T10:12:44.000Z (about 3 years ago)
- Last Synced: 2024-10-24T12:12:42.396Z (about 2 months ago)
- Topics: cuda, darknet, opencv, wsl, wsl2
- Language: Shell
- Homepage:
- Size: 103 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Darknet WSL installer
This is actually a bit less scary than it looks now that I'm on the other side, here's something that will hopefully make your lives easier.
This was a headache to install however so hopefully this helps a bit. There's still some weirdness in the script with python virtual environments but it works alright (installs to base python install).#### About
This script was made out of frustration at the install process, hopefully it helps others. Feel free to post issues/ask questions!
WARNING: There's a good chance this will break your install. Do be warned. Use on a new wsl install (ideally your only one, NVIDIA doesn't like to share its GPUs)
Installs darknet and opencv to use on a clean Ubuntu 20.04 WSL installation
#### First set up your windows host properly:
Follow this guide until step 3 ("Setting up CUDA Toolkit"): https://docs.nvidia.com/cuda/wsl-user-guide/index.html
###### AKA:
- Get on the windows insider builds (anything above 20145 I believe)
- Download the NVIDIA Driver
- Install WSL2#### Download the required files
Download "cuDNN Library for Linux (x86_64)" and "cuDNN Runtime Library for Ubuntu20.04 x86_64 (Deb)" from: https://developer.nvidia.com/cudnn
(you need an account)Put them on your wsl home folder
Jot the names down to plop in the script later on.#### Run the script
(ideally from your home folder, that's where it was tested)```bash
wget https://raw.githubusercontent.com/Christophe-Foyer/install_scripts/main/Darknet_WSL_CUDA.sh
```Check the variables before running with
```bash
nano Darknet_WSL_CUDA.sh
```Change the variables to suit your GPU/Preferences/downloaded files.
```bash
CUDA_ARCH_BIN="5.0"
cuda_version="11-2"
cudnn_file="libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb"
cudnn_lib_file="cudnn-11.2-linux-x64-v8.1.1.33.tgz"
```Now run it:
```bash
chmod +x Darknet_WSL_CUDA.sh
./Darknet_WSL_CUDA.sh
```Then follow prompts. It'll ask for a bunch of yeses, **type in 1 when it asks to choose a gcc** (for gcc7)
Pray for no cuda errors (if it throws "cudaErrorInsufficientDriver" check [here](https://forums.developer.nvidia.com/t/cuda-sample-throwing-error/142537), it's probably not happy that it has to share the GPU). Feel free to ask me questions or post issues. Hope this helps!
## TODO:
Put in install_cuda as a script that's run instead of a duplicate, non-issue when running