markstrefford / running-detectron2-on-windows-wsl2-rtx30xx

How to run Detectron2 on Windows using WSL2 and RTX30xx cards.
Apache License 2.0
13 stars 0 forks source link

nvidia-smi not working #4

Open solarflarefx opened 3 years ago

solarflarefx commented 3 years ago

Hi @markstrefford ,

Here is my PC build.

OS: Windows 10 Pro, 64-Bit GPU: NVIDIA GeForce GTX 1080 Ti x 4 CPU: AMD Ryzen Threadripper 1950X 16-Core Processor

I was able to successfully install WSL2 and Ubuntu 20.04. I also installed Windows Terminal to run the commands. I installed miniconda and created an environment with Python 3.8.

  1. I tried installing CUDA and it seems that did not actually work.

I downloaded the WSL drivers from: https://developer.nvidia.com/cuda/wsl/download image

I downloaded and ran the exe: 470.76_gameready_win10-dch_64bit_international.exe

  1. I then following this user guide: https://docs.nvidia.com/cuda/wsl-user-guide/index.html#installing-nvidia-drivers

I ran:

  1. Step 2 seemed to have run successfully but when I try running nvidia-smi I get:

image

This makes me think the CUDA installation did not actually work.

markstrefford commented 3 years ago

You ran those commands inside WSL2 right? If so maybe you have a PATH issue. Search for adding nvidia-smi to WSL2 path and see what you find.

solarflarefx commented 3 years ago

@markstrefford I downloaded and ran 470.76_gameready_win10-dch_64bit_international.exe in Windows. Then from thereon I used Windows Terminal to run the commands after opening Ubuntu 20.04. I noticed your instructions did not explicitly state my second step of installing Ubuntu NVIDIA drivers. I tried not doing this step and ran into the same error so I installed the drivers but unfortunately this did not help.

markstrefford commented 3 years ago

Step 3 in the WSL2 instructions says

Once you have Ubuntu installed, launch it so you have a command prompt.

The instructions won’t work from a Windows prompt.

Also it’s worth noting that you don’t need to look use wsl2 anymore. Follow the standard conda instructions here https://github.com/markstrefford/running-detectron2-on-windows-wsl2-rtx30xx

solarflarefx commented 3 years ago

@markstrefford If using the Windows installation (without WSL2), where should the command for installation through the yml file occur? An Anaconda command prompt?

I tried in Anaconda prompt and got:

RuntimeError: Error compiling objects for extension

ERROR: Command errored out with exit status 1: 'C:\Users\Windows\Anaconda3\envs\env_detectron2_windows\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Windows\AppData\Local\Temp\pip-req-build-flo_l_6j\setup.py'"'"'; file='"'"'C:\Users\Windows\AppData\Local\Temp\pip-req-build-flo_l_6j\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Windows\AppData\Local\Temp\pip-record-1docfae9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Windows\Anaconda3\envs\env_detectron2_windows\Include\detectron2' Check the logs for full command output. \ failed

CondaEnvException: Pip failed

solarflarefx commented 3 years ago

I downloaded CUDA 11.2 and latest version of cudnn and that seemed to have fixed that problem.

@markstrefford One question I have is that have you gotten DDP training working with detectron2 in Windows?

I believe it should be supported according to this: https://pytorch.org/blog/pytorch-1.7-released/

markstrefford commented 3 years ago

I haven’t done DDP no. Glad you got the install fixed.