serge icon indicating copy to clipboard operation
serge copied to clipboard

Restart Loop

Open lukasdoering opened this issue 2 years ago • 7 comments

Bug description

It's looping a restart

Steps to reproduce

i just followed the setup steps and wehen i tried running docker compose exec serge python3 /usr/src/app/api/utils/download.py tokenizer 7B I got an error saying the container is restarting, so i checked docker an there it says what i pastet into relevant log output

Environment Information

Docker version 20.10.23, build 7155243 Windows 11 Ryzen 7 5800x

Screenshots

No response

Relevant log output

2023-03-25 14:23:57 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:23:58 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:00 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:02 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:03 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:06 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:10 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:17 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:31 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:24:58 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:30 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:32 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:33 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:35 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:37 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:39 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:43 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:25:51 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:26:04 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:26:31 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:27:23 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:24 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:45 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:46 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:48 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:50 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:51 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:54 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found
2023-03-25 14:28:58 serge-serge-1  | /bin/sh: 1: /usr/src/app/deploy.sh: not found

Confirmations

  • [X] I'm running the latest version of the main branch.
  • [X] I checked existing issues to see if this has already been described.

lukasdoering avatar Mar 25 '23 13:03 lukasdoering

Check your end of line sequence in deploy.sh. With vscode, edit file and change crlf by lf on bottom right of the window.

Morfid974 avatar Mar 25 '23 15:03 Morfid974

Check your end of line sequence in deploy.sh. With vscode, edit file and change crlf by lf on bottom right of the window.

Yes, try checking that!

Arolaworld avatar Mar 25 '23 15:03 Arolaworld

Alright I think we diagnosed the issue.

You can fix it by cloning the repo again with git clone https://github.com/nsarrazin/serge.git --config core.autocrlf=input. Then you can rebuild and it should work.

nsarrazin avatar Mar 25 '23 15:03 nsarrazin

Check your end of line sequence in deploy.sh. With vscode, edit file and change crlf by lf on bottom right of the window.

It worked for me, thanks

OnRaptor avatar Mar 25 '23 15:03 OnRaptor

Alright I think we diagnosed the issue.

You can fix it by cloning the repo again with git clone https://github.com/nsarrazin/serge.git --config core.autocrlf=input. Then you can rebuild and it should work.

2023-03-25 10:51:33 /usr/src/app/deploy.sh: line 12:     8 Illegal instruction     mongod
2023-03-25 10:51:34 /usr/src/app/deploy.sh: line 12:     8 Illegal instruction     mongod
2023-03-25 10:51:35 /usr/src/app/deploy.sh: line 12:     8 Illegal instruction     mongod
2023-03-25 10:51:36 /usr/src/app/deploy.sh: line 12:     9 Illegal instruction     mongod

New output

si1en7 avatar Mar 25 '23 15:03 si1en7

@si1en7 What is the output of lscpu | grep avx in the command line ?

nsarrazin avatar Mar 25 '23 18:03 nsarrazin

in my case, my processor is not compatible with AVX (error: Illegal instruction mongod), so the latest version of mongodb is not usable. I modified my Dockerfile to install mongodb 4.4 :

# MongoDB
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list

RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

RUN apt-get update
RUN apt-get install -y mongodb-org

everything works perfectly.

kenny-caldieraro avatar Mar 25 '23 21:03 kenny-caldieraro

in my case, my processor is not compatible with AVX (error: Illegal instruction mongod), so the latest version of mongodb is not usable. I modified my Dockerfile to install mongodb 4.4 :

# MongoDB
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list

RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

RUN apt-get update
RUN apt-get install -y mongodb-org

everything works perfectly.

I accidentally made a mistake when implementing this, and am leaving this here as a future note if anyone encounters this.

If you are replacing https://github.com/nsarrazin/serge/blob/main/Dockerfile#L17-L24 then you need to use

RUN apt-get update
RUN apt-get install -y curl wget gnupg python3-pip git

# MongoDB
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list

RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

RUN apt-get update
RUN apt-get install -y mongodb-org
RUN git clone https://github.com/ggerganov/llama.cpp.git --branch master-d5850c5

countnoobula avatar Mar 28 '23 14:03 countnoobula

countnoobula

This got me up and running, except I used the latest llama branch that was just updated today.

MrTechGadget avatar Mar 29 '23 07:03 MrTechGadget

Can this be closed now?

gaby avatar Apr 05 '23 03:04 gaby