stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Cannot install extension inside Docker Container with `extensions` as a bind volume

Open entmike opened this issue 3 years ago • 2 comments
trafficstars

Is there an existing issue for this?

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

What happened?

When installing an extension inside a Docker container, I now get this error:

Error completing request
Arguments: ('https://github.com/d8ahazard/sd_dreambooth_extension', ['ads', 'localization']) {}
Traceback (most recent call last):
  File "/home/stable/stable-diffusion-webui/modules/ui.py", line 185, in f
    res = list(func(*args, **kwargs))
  File "/home/stable/stable-diffusion-webui/modules/ui_extensions.py", line 144, in install_extension_from_index
    ext_table, message = install_extension_from_url(None, url)
  File "/home/stable/stable-diffusion-webui/modules/ui_extensions.py", line 135, in install_extension_from_url
    os.rename(tmpdir, target_dir)
OSError: [Errno 18] Invalid cross-device link: '/home/stable/stable-diffusion-webui/tmp/sd_dreambooth_extension' -> '/home/stable/stable-diffusion-webui/extensions/sd_dreambooth_extension'

Steps to reproduce the problem

Run AUTOMATIC1111 from a Docker container with extensions mounted during docker run, try to install an extension.

What should have happened?

The extension should have installed.

Commit where the problem happens

ac085628540d0ec6a988fad93f5b8f2154209571

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

`--listen --vae-path /weights/vae-ft-mse-840000-ema-pruned.ckpt --enable-insecure-extension-access`

Additional information, context and logs

I believe the answer may be as simple as using shutil.move instead of os.rename

Source from some Googling: https://stackoverflow.com/questions/42392600/oserror-errno-18-invalid-cross-device-link

entmike avatar Nov 08 '22 15:11 entmike

PS - This issue sounds similar to a symlink issue reported here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4474

entmike avatar Nov 08 '22 15:11 entmike

I'm testing this myself but this should fix it. https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4684

simcop2387 avatar Nov 13 '22 18:11 simcop2387

https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4684

ClashSAN avatar Dec 24 '22 08:12 ClashSAN