Repository: stable-diffusion-webui
Issue: [Bug]:  Torch is not able to use GPU | Ubuntu | Nvidia GeForce GTX 960M
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Originally posted in [community support](https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/4874) but I did not get a response. Given how pervasive this is I think it belongs here anyway, and I haven't seen a good solution for Linux, specifically: 

# Torch is not able to use GPU

- Ubuntu Version: "22.04.1 LTS (Jammy Jellyfish)"

- 3d controller: "NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)"
- VGA compatible controller: "Intel Corporation HD Graphics 530 (rev 06)"
- Driver: nouveau display driver (changed to nvidia-driver-510)

- [cuda toolkit](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network) (11.8.0-1)

***Please note:*** *I don't have much experience with python, so please tell me if there is any more information I should post regarding software versions I'm currently running and I will add it*

I get the error "Torch is not able to use GPU" when running the command `bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)`. 

### Steps to reproduce the problem

I passed `bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)` according to the [README](https://github.com/AUTOMATIC1111/stable-diffusion-webui).

### What should have happened?

I should have been able to run stable diffusion without any problems, or at least been able to open the WebUI

### Commit where the problem happens

Commit hash: 98947d173e3f1667eba29c904f681047dea9de90

### What platforms do you use to access UI ?

Linux

### What browsers do you use to access the UI ?

_No response_

### Command Line Arguments

```Shell
No additional arguments were passed.
```


### Additional information, context and logs

# Here is my terminal output 

```
$ bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on administrator user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.6 (main, Nov  2 2022, 18:53:38) [GCC 11.3.0]
Commit hash: 98947d173e3f1667eba29c904f681047dea9de90
Traceback (most recent call last):
  File "/home/administrator/stable-diffusion-webui/launch.py", line 255, in <module>
    prepare_enviroment()
  File "/home/administrator/stable-diffusion-webui/launch.py", line 176, in prepare_enviroment
    run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
  File "/home/administrator/stable-diffusion-webui/launch.py", line 58, in run_python
    return run(f'"{python}" -c "{code}"', desc, errdesc)
  File "/home/administrator/stable-diffusion-webui/launch.py", line 34, in run
    raise RuntimeError(message)
RuntimeError: Error running command.
Command: "/home/administrator/stable-diffusion-webui/venv/bin/python3" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
```