gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

Docker command show error on running

Open cor277 opened this issue 1 year ago • 9 comments

when try to run the gpt-engineer from docker I recieve this error :

docker run -it --rm -e OPENAI_API_KEY=sk-iv9R5S5u0XqSmTdR1JnOT3BlbkFJSxxxxxxxxx -v .:/project gpt-engineer /app/entrypoint.sh: line 3: $'\r': command not found unning gpt-engineer in /project

What application do you want gpt-engineer to generate? ^C <--------- i tstopped the run for error above.

cor277 avatar Dec 24 '23 09:12 cor277

Can't replicate this, maybe this is fixed? Can you try again and check? I'm using Windows 11, Docker Desktop v4.16.2 (95914)

arghhjayy avatar Jan 17 '24 08:01 arghhjayy

@cor277 does this issue still persist or you don't get that error anymore?

viborc avatar Jan 31 '24 14:01 viborc

I still get this error attempting to run from windows and wsl2. Also, does anyone know how to do "improve" from docker?

oldgithubman avatar Mar 04 '24 19:03 oldgithubman

@cor277 @oldmanjk It seems that the entrypoint.sh file may have a CRLF end of the file, which could be causing the issue. To resolve this, try changing it to LF. In CRLF, every new line is marked by \n\r, but Unix does not recognize the \r character. Changing to LF should fix the problem.

k1lgor avatar Mar 23 '24 08:03 k1lgor

Does @k1lgor s comment resolve this @oldmanjk @cor277 ? Can we close this or do we need changes to the codebase?

ATheorell avatar Apr 04 '24 16:04 ATheorell

Does @k1lgor s comment resolve this @oldmanjk @cor277 ? Can we close this or do we need changes to the codebase?

How do I implement this when I'm running stable? Also, if it works, wouldn't you need to change the codebase?

oldgithubman avatar Apr 04 '24 18:04 oldgithubman

@oldmanjk are you still experiencing this error? It's been a while since this issue was last active and if it's not relevant anymore, I'd like to close it.

Please, let us know.

viborc avatar May 04 '24 09:05 viborc

@oldmanjk are you still experiencing this error? It's been a while since this issue was last active and if it's not relevant anymore, I'd like to close it.

Please, let us know.

No one ever answered my question and I couldn't figure it out so I moved on. I don't know if it's still an issue. Good luck out there

oldgithubman avatar May 04 '24 20:05 oldgithubman

@zigabrencic will review in conjunction with #1136 and, pending resolution, will close.

captivus avatar May 09 '24 17:05 captivus

Here is the replication of the error mentioned: Open the entrypoint.sh file in VSCode and click at the bottom on the editor image and choose CRLF at the top. If you build the container now, will be successful, but executing the entrypoints.sh file inside the container wont be image because the shell does not recognize the CRLF ending of the line. This happens if you create files under Windows env.

k1lgor avatar May 17 '24 21:05 k1lgor

Hey, @k1lgor! We just made a new release - v0.3.1, and the Docker hotfix you proposed is included.

Can you confirm that it's also solving this issue #933 so we can close it?

viborc avatar Jun 06 '24 18:06 viborc

Hey @viborc, I believe this can be closed. Just a note for everyone who wants to use the .sh file inside docker: the file's end of line must be LF.

k1lgor avatar Jun 08 '24 11:06 k1lgor