zerebom / gpt-pdf-summarizer

PDF summarizer that leverages GPT AI to generate summaries from uploaded PDF files. The application uses FastAPI for the backend and Streamlit for the frontend. The project was created with the assistance of AI language models.
108 stars 28 forks source link

Failed to start docker container #2

Open ainzlpnoresponse opened 1 year ago

ainzlpnoresponse commented 1 year ago

I am having trouble starting a Docker container using docker-compose. When I run the command docker-compose up --build, the build process finishes successfully, but the container fails to start.

: not foundmarizer-pdf-summariser-1  | start_services.sh: 1:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 3:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 5:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 7:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 8:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 9:
: not foundmarizer-pdf-summariser-1  | start_services.sh: 11: wait
gpt-pdf-summarizer-pdf-summariser-1 exited with code 127

I am using a Dockerfile and a docker-compose.yml file, both of which are located in the root directory of my project. I am running Docker version 20.10.9 on Windows 10.

Can you please help me solve this issue? Any suggestions or advice would be greatly appreciated.

Thank you.

AlanWallerDev commented 1 year ago

same issue here

zerebom commented 1 year ago

I understand that you're facing an issue with starting a Docker container due to the error messages related to the start_services.sh script. This issue is likely caused by the line endings in the script file. Windows and Linux use different line endings; Windows uses CRLF (Carriage Return, Line Feed), while Linux uses LF (Line Feed).

Docker containers usually run on Linux-based systems, so if your script has Windows line endings, it will cause problems when executed inside the container. To resolve this issue, you need to convert the line endings of the start_services.sh file to LF.

Many text editors (e.g., Visual Studio Code, Notepad++, Atom) allow you to convert line endings. For example, if you're using Visual Studio Code, you can convert the line endings by following these steps:

  1. Open the start_services.sh file in Visual Studio Code.
  2. Click on the CRLF or LF indicator in the bottom-right status bar.
  3. Select LF from the dropdown menu.

Save the changes and then try running the docker-compose up --build command again to see if the issue has been resolved.

I hope this helps!