Repository: stable-diffusion-webui
Issue: [Bug]: RuntimeError: Couldn't install torch (Debian stable)
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

When I try to install the Nvidia version via the automated script, it always fails, even though I tried it with a range of different python environments. When I run it with the default Python version from debian stable (3.9.2), I get "RuntimeError: Couldn't install torch"

But the dependencies say, that I shall use Python 3.10.6, so I created a conda environment with that, activated it and run the bash script, but I still got this:

```
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 daniel user
################################################################

################################################################
Clone stable-diffusion-webui
################################################################
Klone nach 'stable-diffusion-webui' ...
remote: Enumerating objects: 14218, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 14218 (delta 104), reused 112 (delta 54), pack-reused 14036
Empfange Objekte: 100% (14218/14218), 26.29 MiB | 19.35 MiB/s, fertig.
Löse Unterschiede auf: 100% (9918/9918), fertig.

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
Commit hash: 82725f0ac439f7e3b67858d55900e95330bbd326
Installing torch and torchvision
Traceback (most recent call last):
  File "/home/daniel/stable-diffusion-webui/launch.py", line 307, in <module>
    prepare_environment()
  File "/home/daniel/stable-diffusion-webui/launch.py", line 218, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
  File "/home/daniel/stable-diffusion-webui/launch.py", line 64, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "/home/daniel/stable-diffusion-webui/venv/bin/python3" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 137
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
Collecting torch==1.12.1+cu113

stderr: Killed
```

### Steps to reproduce the problem

1. conda create --name diffusion python=3.10.6
2. conda activate diffusion
3. bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)


### What should have happened?

It should have created the environment with torch installed

### Commit where the problem happens

82725f0ac439f7e3b67858d55900e95330bbd326

### What platforms do you use to access UI ?

Linux

### What browsers do you use to access the UI ?

Mozilla Firefox

### Command Line Arguments

_No response_

### Additional information, context and logs

Before that I had the issue, that I installed pytorch via its own documentation in an environment (via pip, since the interactive documentation glitched (or was updated in the meantine) and showed, that only pip would work rn). When I opened the bash script while this environment was activated, I got "RuntimeError: Error running command.
Command: "/home/daniel/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'""

CUDA is installed per Nvidias instruction: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=11&target_type=deb_local

The GPU is a GTX 970