AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

./setup.sh --docker failed

Open joisonwk opened this issue 1 year ago • 5 comments

Has anyone encountered this problem before? It always gets stuck at this point. Can anyone provide some guidance? Thank you.

: not found21:46:34 entrypoint.sh: line 2: : not found21:46:34 entrypoint.sh: line 5: : No such file or directoryisma/schema.prisma : No such file or directoryisma/schema.prisma : not found21:46:34 entrypoint.sh: line 9: 2023-05-03 21:46:35 "023-05-03 21:46:35 ! Unknown command "generate 2023-05-03 21:46:35 2023-05-03 21:46:35 â—­ Prisma is a modern DB toolkit to query, migrate and model your database (https://prisma.io) 2023-05-03 21:46:35 2023-05-03 21:46:35 Usage 2023-05-03 21:46:35 2023-05-03 21:46:35 $ prisma [command] 2023-05-03 21:46:35 2023-05-03 21:46:35 Commands 2023-05-03 21:46:35 2023-05-03 21:46:35 init Set up Prisma for your app 2023-05-03 21:46:35 generate Generate artifacts (e.g. Prisma Client) 2023-05-03 21:46:35 db Manage your database schema and lifecycle 2023-05-03 21:46:35 migrate Migrate your database 2023-05-03 21:46:35 studio Browse your data with Prisma Studio 2023-05-03 21:46:35 validate Validate your Prisma schema 2023-05-03 21:46:35 format Format your Prisma schema 2023-05-03 21:46:35 2023-05-03 21:46:35 Flags 2023-05-03 21:46:35 2023-05-03 21:46:35 --preview-feature Run Preview Prisma commands 2023-05-03 21:46:35 2023-05-03 21:46:35 Examples 2023-05-03 21:46:35 2023-05-03 21:46:35 Set up a new Prisma project 2023-05-03 21:46:35 $ prisma init 2023-05-03 21:46:35 2023-05-03 21:46:35 Generate artifacts (e.g. Prisma Client) 2023-05-03 21:46:35 $ prisma generate 2023-05-03 21:46:35 2023-05-03 21:46:35 Browse your data 2023-05-03 21:46:35 $ prisma studio 2023-05-03 21:46:35 2023-05-03 21:46:35 Create migrations from your Prisma schema, apply them to the database, generate artifacts (e.g. Prisma Client) 2023-05-03 21:46:35 $ prisma migrate dev 2023-05-03 21:46:35
2023-05-03 21:46:35 Pull the schema from an existing database, updating the Prisma schema 2023-05-03 21:46:35 $ prisma db pull 2023-05-03 21:46:35 2023-05-03 21:46:35 Push the Prisma schema state to the database 2023-05-03 21:46:35 $ prisma db push 2023-05-03 21:46:35 2023-05-03 21:46:35 Validate your Prisma schema 2023-05-03 21:46:35 $ prisma validate 2023-05-03 21:46:35 2023-05-03 21:46:35 Format your Prisma schema 2023-05-03 21:46:35 $ prisma format 2023-05-03 21:46:35 ': No such file or directorynt.sh: source: line 13: can't open '.env

joisonwk avatar May 03 '23 13:05 joisonwk

Found a workaround. Install dos2unix and run:

dos2unix entrypoint.sh

then ./setup.sh --docker again.

alexarthurs avatar May 05 '23 01:05 alexarthurs

thank you, this is very useful for me

joisonwk avatar May 07 '23 03:05 joisonwk

I had the same issue, but the entrypoint was only half the battle. So, I fixed every file:

find . -type f -exec dos2unix "{}" \;

Hope that helps someone.

absane avatar May 10 '23 20:05 absane

Hey thanks folks

I run a windows machine so it seems this has caused issues with line endings 😅. We've recently migrated to a full docker setup (We just ran locally before) so we'll be facing these issues ourselves and can therefore better handle them as they arise.

For the entry point specifically, we have updated the dockerfile to do exactly what @alexarthurs and @absane are mentioning which should hopefully remediate this issue (Though this is only for the entrypoint and wait for db scripts)

asim-shrestha avatar May 10 '23 23:05 asim-shrestha

Related to #511

lauralex avatar May 11 '23 16:05 lauralex