AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.72k stars 25.9k forks source link

[Bug]: WebUI wont launch on a fresh install of Ubuntu 22.04 LTS #15507

Open TotallyNotLuna opened 2 months ago

TotallyNotLuna commented 2 months ago

Checklist

What happened?

WebUI fails to launch and hangs indefinitely at "Launching Web UI with Arguments: ..." Issuing a keyboard interrupt results in the kernel repeatedly logging information regarding a blocked python process.

Steps to reproduce the problem

System Setup:

  1. Install Ubuntu 22.04 LTS.
  2. Update and upgrade apt packages.
  3. Install nvidia drivers from package manager ( Ver. 535 ). 3a. Blacklist nouveau on the kernel. 3b. Reboot and verify drivers installed correctly with nvidia-smi. Screenshot from 2024-04-13 13-27-10
  4. Install cuda from package manager. 4a. Verify cuda installed correctly with nvcc --version. Screenshot from 2024-04-13 13-27-43 4b. Verify cuda is functional by compiling and running sample project provided through the package manager.
  5. Install cudnn from the package manager.
  6. Install pyenv. 6a. Add exports to .bashrc for CLI operations.
  7. Install python 3.10.6 through pyenv. 7a. Install libs as needed until python 3.10.6 can compile with a full feature set.
  8. Reboot.

WebUI Setup:

  1. Git clone WebUI repo.
  2. Cd to repo.
  3. Setup python virtual environment. 3a. Run pyenv local 3.10.6 3b. run python -m venv venv 3c. Run . ./venv/bin/activate 3d. Verify python is version 3.10.6 with python --version.
  4. Run ./webui.sh while virtual environment is active. 4a. Installation runs until torch.cuda.is_available() is hit, at which point the installation hangs indefinitely. 4b. CTRL+C interrupt to kill the process. Screenshot from 2024-04-13 14-02-42 4c. Add --skip-torch-cuda-test as an additional command line arg.
  5. Run ./webui.sh while virtual environment is active. 5a. Installation runs until "Launching Web UI with arguments: ..." is hit, at which point the installation hangs indefinitely. 5b. Attempt a CTRL+C interrupt but get no response. 5c. Occasionally at this point the kernel will log that a python process is currently blocked. Screenshot from 2024-04-13 14-14-38

What should have happened?

WebUI should launch and provide the user with output displaying a URL where the WebUI frontend may be reached.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

I Cannot reach WebUI to obtain the Sysinfo and running ./webui.sh --dump-sysinfo results in a crash. Screenshot from 2024-04-13 15-31-59

Console logs

Please see "Steps to reproduce the problem" section attachments.

Additional information

No response

TotallyNotLuna commented 2 months ago

Reinstalled Ubuntu 22.04 LTS again, but this time captured logs of each session as the system was setup and WebUI was installed. Same issues occurred as described above.

apt-and-blacklist.log gpu-setup.log gpu-verify-setup.log pyenv-setup.log python-3.10.6-install.log webui-setup.log

TongfanWeitf commented 2 months ago

i think there is a tutoring about how to install sd webui on Google cloud. As far as I've seen, you can try directly run launch.py with argument shared=true. That works for me

TotallyNotLuna commented 2 months ago

This isn't a Google Cloud server, but I went ahead a wiped the VM again to follow that guide (presumably this one: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/9131 ). Unfortunately I still encountered all of the same issues as described above.

It's worth noting that guide has you install drivers not recommended by Ubuntu 22.04 LTS and also makes no mention of downgrading python meaning it has you run with the current shipping version in the package manager which is 3.10.12, not the 3.10.6 version required by webui.