carefree0910 / carefree-creator

AI magics meet Infinite draw board.
https://creator.nolibox.com/guest
MIT License
2.13k stars 216 forks source link

/bin/sh: 1: COPY: not found #39

Open Nafine opened 4 months ago

Nafine commented 4 months ago

While building with docker i got whis problem:

315.7 /bin/sh: 1: COPY: not found ERROR: process "/bin/sh -c rm -rf /opt/conda/lib/python3.10/site-packages/cv2 && pip install -U pip && apt-get update && apt-get install -y gcc git tzdata && pip install --upgrade Pillow && apt-get clean && rm -rf /tmp/ /var/cache/ /usr/share/doc/ /usr/share/man/ /var/lib/apt/lists/* && COPY . ." did not complete successfully: exit code: 127

[3/4] RUN rm -rf /opt/conda/lib/python3.10/site-packages/cv2 && pip install -U pip && apt-get update && apt-get install -y gcc git tzdata && pip install --upgrade Pillow && apt-get clean && rm -rf /tmp/ /var/cache/ /usr/share/doc/ /usr/share/man/ /var/lib/apt/lists/* && COPY . .

Didn't find any information, why this error occures?

Nafine commented 4 months ago

Also i tried pip install, but with this command:

cfcreator serve

I get this error: ImportError: cannot import name 'DLZoo' from 'cflearn.zoo' (c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cflearn\zoo\__init__.py)

carefree0910 commented 4 months ago

Ah, both are my legacy typos, I just pushed two commits and would you please update the codes and see whether the errors still exist?

Nafine commented 4 months ago

Now docker can build it, but there's another error occures when I try to run it:

/opt/conda/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/opt/conda/lib/python3.10/site-packages/torchvision/image.so: undefined symbol: _ZN3c1017RegisterOperatorsD1Ev'If you don't plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source? warn( Traceback (most recent call last): File "/opt/conda/bin/cfcreator", line 5, in from cfcreator.cli import main File "/opt/conda/lib/python3.10/site-packages/cfcreator/init.py", line 2, in from .common import * File "/opt/conda/lib/python3.10/site-packages/cfcreator/common.py", line 48, in from .utils import api_pool File "/opt/conda/lib/python3.10/site-packages/cfcreator/utils.py", line 1, in import cv2 ImportError: libGL.so.1: cannot open shared object file: No such file or directory

carefree0910 commented 4 months ago

This looks like an env issue, I'm not available to debug the Docker env right now, maybe you can try to modify the Dockerfile and try to install a correct opencv?

Nafine commented 4 months ago

Yeah, trying to solve problem. Have just added libgl1 to apt-install, later will try to run it.

Nafine commented 4 months ago

Installed with pip, ran. Got this error: ValueError: cannot find ControlNetHED.pth

carefree0910 commented 4 months ago

Installed with pip, ran. Got this error: ValueError: cannot find ControlNetHED.pth

Ah, another known issue which was fixed in the latest version, which I cannot commit because I'm afraid that they will break everything you've tried. 🤣

To make things easier, maybe you can download this file and put it under ~/.cache/external/annotators folder, and see if it fixes the issue!

Nafine commented 4 months ago

Now I can run it(with python3.10), but get segfault(seems to be that I just dont have enough memory, 8 GB RAM, 4GB VRAM) Later I'l try to run it on other computer (don't have access right now 😢):

cfcreator serve --lazy --cache_dir . C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True. warnings.warn( C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\cflearn\misc\toolkit.py:419: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.) return pt2_sdp_attn(q, k, v, mask, dropout) Segmentation fault

Nafine commented 4 months ago

cfcreator serve --limit 1 --cache_dir . Traceback (most recent call last): File "C:\Users\Nafine\AppData\Local\Programs\Python\Python39\Scripts\cfcreator-script.py", line 33, in sys.exit(load_entry_point('carefree-creator', 'console_scripts', 'cfcreator')()) File "C:\Users\Nafine\AppData\Local\Programs\Python\Python39\Scripts\cfcreator-script.py", line 25, in importlib_load_entry_point return next(matches).load() File "c:\users\nafine\appdata\local\programs\python\python39\lib\importlib\metadata.py", line 77, in load module = import_module(match.group('module')) File "c:\users\nafine\appdata\local\programs\python\python39\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "e:\gitrepos\carefree-creator\cfcreator\init.py", line 2, in from .common import * File "e:\gitrepos\carefree-creator\cfcreator\common.py", line 27, in from cflearn.zoo import DLZoo File "c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cflearn\init.py", line 18, in from .api import cv File "c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cflearn\api\cv\init__.py", line 2, in from .diffusion import * File "c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cflearn\api\cv\diffusion.py", line 60, in from ..utils import APIMixin File "c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cflearn\api\utils.py", line 9, in from cftool.data_structures import ILoadableItem ImportError: cannot import name 'ILoadableItem' from 'cftool.data_structures' (c:\users\nafine\appdata\local\programs\python\python39\lib\site-packages\cftool\data_structures.py)

😃

carefree0910 commented 4 months ago

Ahhhhh my bad again, I tried to pin another version, please pull again and try if it works. 🤣🙏

Nafine commented 4 months ago

Pulled. cfcreator serve --limit 1 --cache_dir . C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True. warnings.warn( C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\cflearn\misc\toolkit.py:419: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.) return pt2_sdp_attn(q, k, v, mask, dropout) C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\vit\feature_extraction_vit.py:28: FutureWarning: The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use ViTImageProcessor instead. warnings.warn( Traceback (most recent call last): File "C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 566, in aenter await self._router.startup() File "C:\Users\Nafine\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 654, in startup await handler() File "e:\gitrepos\carefree-creator\cfcreator\apis\interface.py", line 331, in startup v.initialize() File "e:\gitrepos\carefree-creator\cfcreator\third_party\facexlib.py", line 61, in initialize raise ImportError("facexlib should be installed for FacexlibParse") ImportError: facexlib should be installed for FacexlibParse

Tried to install in manually, but it led to endless loading. :)

carefree0910 commented 4 months ago

Ah, could you please tell me what happens during the 'endless loading'? Because maybe it means it's working (at least partially...)

Nafine commented 4 months ago

Screenshot_1 Screenshot_2

RAM and VRAM busy, but initialization stops here(was afk for couple hours).

carefree0910 commented 3 months ago

Maybe I need more context, would you mind screenshot more?