carefree0910 / carefree-creator

AI magics meet Infinite draw board.

Home Page:https://creator.nolibox.com/guest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/bin/sh: 1: COPY: not found

Nafine opened this issue · comments

commented

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?

commented

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)

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?

commented

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

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?

commented

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

commented

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

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!

commented

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

commented

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)

😃

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

commented

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.
:)

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

commented

Screenshot_1
Screenshot_2

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

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