QuivrHQ / quivr

Opiniated RAG for integrating GenAI in your apps 🧠 Focus on your product rather than the RAG. Easy integration in existing products with customisation! Any LLM: GPT4, Groq, Llama. Any Vectorstore: PGVector, Faiss. Any Files. Anyway you want.
https://core.quivr.com
Other
36.65k stars 3.58k forks source link

[Bug]: Exception thrown on startup #2011

Closed xzy66s closed 7 months ago

xzy66s commented 10 months ago

What happened?

Executing docker compose up --build throws an exception. why?

Relevant log output

root@test-virtual-machine:/home/test/quivr-0.0.161# docker compose up --build

[+] Building 46.3s (39/61)                                                                        docker:default
 => [worker internal] load build definition from Dockerfile                                                 0.0s
 => => transferring dockerfile: 1.12kB                                                                      0.0s
 => [worker internal] load .dockerignore                                                                    0.0s
 => => transferring context: 185B                                                                           0.0s
 => [backend-core internal] load build definition from Dockerfile                                           0.0s
 => => transferring dockerfile: 1.12kB                                                                      0.0s
 => [backend-core internal] load .dockerignore                                                              0.0s
 => => transferring context: 185B                                                                           0.0s
 => [flower internal] load metadata for docker.io/library/python:3.11.6-slim-bullseye@sha256:0c1fbb294096d  2.7s
 => [beat internal] load .dockerignore                                                                      0.0s
 => => transferring context: 185B                                                                           0.0s
 => [beat internal] load build definition from Dockerfile                                                   0.0s
 => => transferring dockerfile: 1.12kB                                                                      0.0s
 => [flower 1/8] FROM docker.io/library/python:3.11.6-slim-bullseye@sha256:0c1fbb294096d842ad795ee232d783c  0.0s
 => [backend-core internal] load build context                                                              0.1s
 => => transferring context: 16.97kB                                                                        0.1s
 => [worker internal] load build context                                                                    0.1s
 => => transferring context: 16.97kB                                                                        0.1s
 => [beat internal] load build context                                                                      0.1s
 => => transferring context: 16.97kB                                                                        0.1s
 => CACHED [flower 2/8] RUN apt-get clean && apt-get update && apt-get install -y     libgeos-dev     libc  0.0s
 => CACHED [flower 3/8] WORKDIR /code                                                                       0.0s
 => CACHED [beat 4/8] COPY ./requirements.txt .                                                             0.0s
 => CACHED [beat 5/8] RUN pip install --upgrade pip                                                         0.0s
 => CACHED [beat 6/8] RUN pip install --no-cache-dir -r requirements.txt --timeout 200                      0.0s
 => CACHED [beat 7/8] RUN if [ "" = "true" ]; then pip install --no-cache debugpy --timeout 200; fi         0.0s
 => CACHED [beat 8/8] COPY . .                                                                              0.0s
 => [beat] exporting to image                                                                               0.0s
 => => exporting layers                                                                                     0.0s
 => => writing image sha256:1d2341accc3483b42db890c5449e7ee51ba1f5c3f410aa24c7e7a54a53f1401d                0.0s
 => => naming to docker.io/stangirard/quivr-backend-prebuilt:latest                                         0.0s
 => [worker] exporting to image                                                                             0.0s
 => => exporting layers                                                                                     0.0s
 => => writing image sha256:dfbf6a15100482d4b17525fed6644fea684bf601fb7bdd689cde76d1bf6c0485                0.0s
 => => naming to docker.io/stangirard/quivr-backend-prebuilt:latest                                         0.0s
 => [backend-core] exporting to image                                                                       0.0s
 => => exporting layers                                                                                     0.0s
 => => writing image sha256:edb09028876429119464269649c51ab128608f7d3ffc5d7c173f4e7d97fdd5de                0.0s
 => => naming to docker.io/stangirard/quivr-backend-prebuilt:latest                                         0.0s
 => [flower internal] load build definition from Dockerfile                                                 0.0s
 => => transferring dockerfile: 1.12kB                                                                      0.0s
 => [flower internal] load .dockerignore                                                                    0.0s
 => => transferring context: 185B                                                                           0.0s
 => [frontend internal] load build definition from Dockerfile                                               0.0s
 => => transferring dockerfile: 2.68kB                                                                      0.0s
 => [frontend internal] load .dockerignore                                                                  0.0s
 => => transferring context: 340B                                                                           0.0s
 => [flower internal] load build context                                                                    0.0s
 => => transferring context: 16.97kB                                                                        0.0s
 => [frontend internal] load metadata for docker.io/library/node:18.19.0-alpine                             1.7s
 => CACHED [flower 4/8] COPY ./requirements.txt .                                                           0.0s
 => CACHED [flower 5/8] RUN pip install --upgrade pip                                                       0.0s
 => CACHED [flower 6/8] RUN pip install --no-cache-dir -r requirements.txt --timeout 200                    0.0s
 => CACHED [flower 7/8] RUN if [ "" = "true" ]; then pip install --no-cache debugpy --timeout 200; fi       0.0s
 => CACHED [flower 8/8] COPY . .                                                                            0.0s
 => [flower] exporting to image                                                                             0.0s
 => => exporting layers                                                                                     0.0s
 => => writing image sha256:41e6918d81e1c480fe0a214a43183961baf93f053e30ec1449ab5d2a11508d06                0.0s
 => => naming to docker.io/stangirard/quivr-backend-prebuilt:latest                                         0.0s
 => [frontend internal] load build context                                                                  0.2s
 => => transferring context: 81.82kB                                                                        0.2s
 => CACHED [frontend base 1/1] FROM docker.io/library/node:18.19.0-alpine@sha256:b1a0356f7d6b86c958a06949d  0.0s
 => CACHED [frontend builder 1/4] WORKDIR /app                                                              0.0s
 => CACHED [frontend runner 2/8] RUN addgroup --system --gid 1001 nodejs                                    0.0s
 => CACHED [frontend runner 3/8] RUN adduser --system --uid 1001 nextjs                                     0.0s
 => ERROR [frontend deps 1/5] RUN apk add --no-cache libc6-compat python3 make g++                         41.5s
------
 > [frontend deps 1/5] RUN apk add --no-cache libc6-compat python3 make g++:
1.084 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
16.82 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.19/main: Permission denied
16.82 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
41.50 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.19/community: Permission denied
41.50 ERROR: unable to select packages:
41.50   g++ (no such package):
41.50     required by: world[g++]
41.50   libc6-compat (no such package):
41.50     required by: world[libc6-compat]
41.50   make (no such package):
41.50     required by: world[make]
41.50   python3 (no such package):
41.50     required by: world[python3]
------
failed to solve: process "/bin/sh -c apk add --no-cache libc6-compat python3 make g++" did not complete successfully: exit code: 4

Twitter / LinkedIn details

No response

dosubot[bot] commented 10 months ago

🤖

Hey @xzy66s! :wave: I'm Dosu, a friendly bot here to assist with bugs and questions while you're waiting for a human. I'm on standby to make your experience better, so feel free to reach out to me anytime. Let's get through this together! :robot::wrench:

The error you're encountering seems to be related to the Docker build process for the frontend service. The error message indicates that the Docker build process is unable to fetch and install the required packages (libc6-compat, python3, make, g++) due to a permission issue with the Alpine package repository.

There are a few potential solutions to this issue based on similar issues in the Quivr repository:

  1. Set the Docker daemon.json with the correct DNS. This solution was suggested in the issue [Bug]: frontend build failed when running with ollama in step "RUN apk add --no-cache libc6-compat python3 make g++". The issue might be related to DNS resolution problems when Docker is trying to fetch the packages from the Alpine repository.

  2. Change line endings from CRLF to LF for the backend/scripts/start.sh file and rebuild the Docker image. This solution was suggested in the issue Error with Docker compose for backend. This issue might be related to the line endings in the start script causing problems when the Docker image is being built.

  3. Use a VPN set to the United States to resolve network environment issues. This solution was suggested in the issue failed to solve: process "/bin/sh -c apk add --update --no-cache python3 make g++ && ln -sf python3 /usr/bin/python" did not complete successfully: exit code: 3. This issue might be related to network restrictions or limitations in certain regions.

Please try these solutions and let me know if any of them resolve your issue. If not, could you provide more information about your environment? Specifically, the exact versions of Docker and Docker Compose you're using could be helpful in diagnosing the issue.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

github-actions[bot] commented 7 months ago

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

shaoyaocao commented 6 months ago

{ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } }, "dns": [ "8.8.8.8", "114.114.114.114" ], "experimental": false }