ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
649 stars 224 forks source link

docker compose build error - run set -eo pipefall && ... #74

Closed FrankTrog closed 6 months ago

FrankTrog commented 6 months ago

I cloned the repo and am attempting to build and test the image locally. However, an error has occurred.

$ docker compose build
time="2024-05-15T15:15:56-04:00" level=warning msg=".\\docker-compose.yaml: `version` is obsolete"
[+] Building 0.0s (0/0)  docker:default
[+] Building 12.6s (7/9)                                                                                               docker:default
 => [supervisor internal] load build definition from Dockerfile                                                                  0.2s
 => => transferring dockerfile: 1.58kB                                                                                           0.0s
 => [supervisor internal] load metadata for ghcr.io/ai-dock/python:3.10-cuda-11.8.0-runtime-22.04                                4.8s
 => [supervisor internal] load .dockerignore                                                                                     0.1s
 => => transferring context: 2B                                                                                                  0.0s
 => [supervisor 1/5] FROM ghcr.io/ai-dock/python:3.10-cuda-11.8.0-runtime-22.04@sha256:cdaceae855c4345a6034ac7a6da5882b2f7de043  0.0s
 => [supervisor internal] load build context                                                                                     0.1s
 => => transferring context: 7.29kB                                                                                              0.0s
 => CACHED [supervisor 2/5] COPY --chown=0:1111 ./COPY_ROOT/ /                                                                   0.0s
 => ERROR [supervisor 3/5] RUN set -eo pipefail && /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log                7.0s
------
 > [supervisor 3/5] RUN set -eo pipefail && /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log:
0.895 /bin/bash: /opt/ai-dock/bin/build/layer0/init.sh: /bin/bash^M: bad interpreter: No such file or directory
------
failed to solve: process "/bin/bash -c set -eo pipefail && /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log" did not com
plete successfully: exit code: 126

This is pointing to the build/DockerFile line 29. Upon reviewing the fall line 29 is the same as line 37. It appears it is failing because the files it is targeting haven't been copied over, which occurs on line 36. Commenting the line out does allow for a build to occur, however, when the image is launched ComfyUI fails to start after many attempts with error code 127. The error code issue should be documented in a separte ticket, I assume, unless commenting out line 27 somehow creates the issue with ComfyUI not starting and creating error 127 in bash (which typically means command not found).

robballantyne commented 6 months ago

bin/bash^M suggests you have windows line endings. You'll need to clone and build under Linux.

FrankTrog commented 6 months ago

I set the line endings properly in VS Code to LF

On Wed, May 15, 2024, 3:43 PM Rob Ballantyne @.***> wrote:

bin/bash^M suggests you have windows line endings. You'll need to clone and build under Linux.

— Reply to this email directly, view it on GitHub https://github.com/ai-dock/comfyui/issues/74#issuecomment-2113331918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2U7PVUDOOXG5VMKAVCX7TZCO3GXAVCNFSM6AAAAABHYYTQROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGMZTCOJRHA . You are receiving this because you authored the thread.Message ID: @.***>

FrankTrog commented 6 months ago

I apologize. I will try setting it for the entire project/repo and try again and let you know of the results. Thanks!

On Wed, May 15, 2024, 8:50 PM Frank Troglauer Jr @.***> wrote:

I set the line endings properly in VS Code to LF

On Wed, May 15, 2024, 3:43 PM Rob Ballantyne @.***> wrote:

bin/bash^M suggests you have windows line endings. You'll need to clone and build under Linux.

— Reply to this email directly, view it on GitHub https://github.com/ai-dock/comfyui/issues/74#issuecomment-2113331918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2U7PVUDOOXG5VMKAVCX7TZCO3GXAVCNFSM6AAAAABHYYTQROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGMZTCOJRHA . You are receiving this because you authored the thread.Message ID: @.***>

FrankTrog commented 6 months ago

My apologies for wasting you and any team members time on this @robballantyne. I installed tumbleweed and built the image from there and it runs great. Thanks! I did try various ways to attempt and build it from Windows and it just wouldn't work properly due to the crlf vs lf handling.

goxxy commented 6 days ago

I used dos2unix to address the issue when I ran into it. Leaving it here in case it's useful at some point.

get-childitem -path . -filter '*.sh' -recurse | foreach-object {D:\path\dos2unix-7.5.2-win64\bin\dos2unix.exe $_.Fullname}