Repository: stable-diffusion-webui
Issue: ImportError: dlopen: cannot load any more object with static TLS
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?

Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on admin user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.9.12 (main, Jun  1 2022, 11:38:51)
[GCC 7.5.0]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Traceback (most recent call last):
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/launch.py", line 44, in main
    start()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/initialize.py", line 37, in imports
    from modules import processing, gradio_extensons, ui  # noqa: F401
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/processing.py", line 10, in <module>
    import cv2
  File "/home/admin/.conda/envs/llm/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/admin/.conda/envs/llm/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/home/admin/.conda/envs/llm/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen: cannot load any more object with static TLS

### Steps to reproduce the problem

bash web.sh

### What should have happened?

report error

### Sysinfo

"Platform": "Linux-4.9.168-018.ali3000.alios7.x86_64-x86_64-with-glibc2.18",
    "Python": "3.9.12",
    "Version": "v1.6.0-2-g4afaaf8a",
    "Commit": "4afaaf8a020c1df457bcf7250cb1c7f609699fa7",
    "Script path": "/mnt/workspace/yankai.yan/stable-diffusion-webui",
    "Data path": "/mnt/workspace/yankai.yan/stable-diffusion-webui",
    "Extensions dir": "/mnt/workspace/yankai.yan/stable-diffusion-webui/extensioo
ns",
    "Checksum": "1bb47bf8321ce056c5ee3339ddb2d8aa702af060371659b15253d9f78098fcaa
e",
    "Commandline": [
        "launch.py",
        "--dump-sysinfo"
    ],
    "Torch env info": {
        "torch_version": "2.0.1+cu118",
        "is_debug_build": "False",
        "cuda_compiled_version": "11.8",
        "gcc_version": "(GCC) 6.5.1 20190307 (Alibaba 6.5.1-1 2.17)",
        "clang_version": null,
        "cmake_version": "version 3.27.7",
        "os": "Alibaba Group Enterprise Linux Server release 7.2 (Paladin) (x86__
64)",
        "libc_version": "glibc-2.18",
        "python_version": "3.9.12 (main, Jun  1 2022, 11:38:51)  [GCC 7.5.0] (644
-bit runtime)",
        "python_platform": "Linux-4.9.168-018.ali3000.alios7.x86_64-x86_64-with--
glibc2.18",
        "is_cuda_available": "True",
        "cuda_runtime_version": null,
        "cuda_module_loading": "LAZY",
        "nvidia_driver_version": "515.105.01",
        "nvidia_gpu_models": [
            "GPU 0: Tesla V100-SXM2-16GB",
            "GPU 1: Tesla V100-SXM2-16GB",
            "GPU 2: Tesla V100-SXM2-16GB",
            "GPU 3: Tesla V100-SXM2-16GB",
            "GPU 4: Tesla V100-SXM2-16GB",
            "GPU 5: Tesla V100-SXM2-16GB",
            "GPU 6: Tesla V100-SXM2-16GB",
            "GPU 7: Tesla V100-SXM2-16GB"
        ],
 "pip_version": "pip3",
        "pip_packages": [
            "numpy==1.23.5",
            "open-clip-torch==2.20.0",
            "pytorch-lightning==1.9.4",
            "torch==2.0.1+cu118",
            "torchdiffeq==0.2.3",
            "torchmetrics==1.2.0",
            "torchsde==0.2.5",
            "torchvision==0.15.2+cu118"
        ],
        "conda_packages": [
            "numpy                     1.23.5                   pypi_0    pypi",
            "open-clip-torch           2.20.0                   pypi_0    pypi",
            "pytorch-lightning         1.9.4                    pypi_0    pypi",
            "torch                     2.0.1+cu118              pypi_0    pypi",
            "torchdiffeq               0.2.3                    pypi_0    pypi",
            "torchmetrics              1.2.0                    pypi_0    pypi",
            "torchsde                  0.2.5                    pypi_0    pypi",
            "torchvision               0.15.2+cu118             pypi_0    pypi"

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

_No response_

### Console logs

```Shell
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on admin user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.9.12 (main, Jun  1 2022, 11:38:51)
[GCC 7.5.0]
Version: v1.6.0-2-g4afaaf8a
Commit hash: 4afaaf8a020c1df457bcf7250cb1c7f609699fa7
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Traceback (most recent call last):
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/launch.py", line 44, in main
    start()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/initialize.py", line 37, in imports
    from modules import processing, gradio_extensons, ui  # noqa: F401
  File "/mnt/workspace/yankai.yan/stable-diffusion-webui/modules/processing.py", line 10, in <module>
    import cv2
  File "/home/admin/.conda/envs/llm/lib/python3.9/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/admin/.conda/envs/llm/lib/python3.9/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/home/admin/.conda/envs/llm/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen: cannot load any more object with static TLS
```


### Additional information

_No response_