Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyspur-Backend refuses to run in Docker #62

Open
yotraxxx opened this issue Dec 25, 2024 · 2 comments
Open

Pyspur-Backend refuses to run in Docker #62

yotraxxx opened this issue Dec 25, 2024 · 2 comments
Assignees

Comments

@yotraxxx
Copy link

Hi Pyspur team !

I have a hard time to make pyspur running in docker. Only the pyspur-Backend package refuses to run, the to others seem to run normally (green status).
I have to say I am a total noob with docker (first time launching).
I want to run PysPur with Ollama only (HOST env variable set to 0.0.0.0). I'm running on Windows 11.
Here's the log error concerning Pyspur-Backend, repeating again and again ->

2024-12-25 15:16:06 /pyspur/entrypoint.sh: line 2: $'\r': command not found
2024-12-25 15:16:06 /pyspur/entrypoint.sh: line 11: syntax error near unexpected token $'{\r'' 2024-12-25 15:16:06 /pyspur/entrypoint.sh: line 11: check_for_changes() {

Any clue to resolve this issue ?

@srijanpatel srijanpatel self-assigned this Dec 25, 2024
@cgerlfunkenwerfer
Copy link

I had the same error on Windows. It happens, when git automatically converts the Line Endings to Windows format.

How to fix it using Visual Studio code:

Steps to Convert Line Endings to Unix Style in VS Code

  1. Open the File:
  • Open your entrypoint.sh script in VS Code.
  1. Check the Line Endings:
  • At the bottom-right corner of the VS Code window, you'll see a status bar showing the current line ending format (e.g., CRLF for Windows or LF for Unix).
  • If it says CRLF, this indicates Windows-style line endings.
  1. Change the Line Endings:
  • Click on the CRLF text in the status bar.

  • A pop-up will appear with options like:
    LF (Unix)
    CRLF (Windows)

  • Select LF to switch to Unix-style line endings.

  1. Save the File:
  • After selecting LF, save the file (Ctrl+S or Cmd+S on macOS).

This happens because of a git config on you local git installation

Run the following command to check the current configuration:

git config --get core.autocrlf

Possible Values:
true: Converts LF to CRLF on checkout and CRLF back to LF on commit.
false: Does not perform any conversion.
input: Converts CRLF to LF on commit but does not modify files on checkout.

Change the Line Ending Behavior
Option A: Set Globally
To disable automatic line ending conversion globally:

git config --global core.autocrlf false

Option B: Set for a Specific Repository
To apply the setting only to the current repository:

git config core.autocrlf false

@srijanpatel
Copy link
Collaborator

Hi @yotraxxx @cgerlfunkenwerfer we just shipped our first release and official pyspur docker images along with it. These images come with app code embedded in them and thus should be able to run on windows machine too.

Can you checkout latest code and follow the quick start steps to see if it works for you now?
Specifically, you can use docker-compose.prod.yml to launch the app with pyspur docker images (instead of building them on the fly like before)

https://github.com/PySpur-Dev/pyspur?tab=readme-ov-file#-quick-start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants