QuivrHQ / quivr

Open-source RAG Framework for building GenAI Second Brains 🧠 Build productivity assistant (RAG) ⚡️🤖 Chat with your docs (PDF, CSV, ...) & apps using Langchain, GPT 3.5 / 4 turbo, Private, Anthropic, VertexAI, Ollama, LLMs, Groq that you can share with users ! Efficient retrieval augmented generation framework
https://quivr.com
Other
36.37k stars 3.54k forks source link

[Bug]: docker compose gets stuck on Creating an optimized production build... #1911

Closed webyacusa closed 8 months ago

webyacusa commented 10 months ago

What happened?

I am trying to run Quivr on a Mac with Sonoma 14.2 (M1 max chip). After I run the docker compose up, it runs for a little bit, but then it gets stuck when building the front end with next, more specifically on this line:

Any suggestions what to do?

Relevant log output

[...]
[4/4] Building fresh packages...
Done in 69.69s.
--> e726b19d7e9c
[3/4] STEP 1/17: FROM 65c1498de5cce7da532b9fdb61b194f09e076aec1184c2f67d0888d33c1754ef AS builder
[3/4] STEP 2/17: WORKDIR /app
--> 8823fed6f898
[3/4] STEP 3/17: COPY --from=deps /app/node_modules ./node_modules
--> 5bb3ce19a1e6
[3/4] STEP 4/17: COPY . .
--> 1a52c6416427
[3/4] STEP 5/17: ARG NEXT_PUBLIC_ENV
--> 64127f502070
[3/4] STEP 6/17: ARG NEXT_PUBLIC_BACKEND_URL
--> e1c0164428c9
[3/4] STEP 7/17: ARG NEXT_PUBLIC_SUPABASE_URL
--> 3717aa1b6eb4
[3/4] STEP 8/17: ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
--> d02795bad034
[3/4] STEP 9/17: ARG NEXT_PUBLIC_CMS_URL
--> bddaaed14f07
[3/4] STEP 10/17: ARG NEXT_PUBLIC_FRONTEND_URL
--> 3c418800e892
[3/4] STEP 11/17: ENV NEXT_PUBLIC_ENV=$NEXT_PUBLIC_ENV
--> 82fc12c87da5
[3/4] STEP 12/17: ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
--> 1362d9d48e92
[3/4] STEP 13/17: ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
--> ef56abd451ed
[3/4] STEP 14/17: ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
--> 77c93f502ce9
[3/4] STEP 15/17: ENV NEXT_PUBLIC_CMS_URL=$NEXT_PUBLIC_CMS_URL
--> 44e3ae083620
[3/4] STEP 16/17: ENV NEXT_PUBLIC_FRONTEND_URL=$NEXT_PUBLIC_FRONTEND_URL
--> 50fb63e8e41b
[3/4] STEP 17/17: RUN yarn build
yarn run v1.22.19
$ next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

- info Creating an optimized production build...

Twitter / LinkedIn details

No response

dosubot[bot] commented 10 months ago

🤖

Hey @webyacusa! 👋 I'm Dosu, a friendly bot here to assist you with bugs, answer your questions, and guide you on your journey to becoming a contributor. While we're waiting for a human maintainer to join us, feel free to ask me anything. Let's get your issue sorted out!

The issue you're experiencing with Docker Compose getting stuck at "Creating an optimized production build" could be due to compatibility issues with the M1 chip. The Dockerfile is using the node:18.13.0-alpine image which might not be fully compatible with the M1 chip.

You can try using an image that is compatible with the M1 chip, such as node:18.13.0-alpine3.14. Here's the updated Dockerfile:

FROM node:18.13.0-alpine3.14
# Install Python and essential build tools
RUN apk add --update --no-cache python3 make g++ git && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools

# Create the directory on the node image 
# where our Next.js app will live
RUN mkdir -p /app

# Set /app as the working directory
WORKDIR /app

# Copy package.json and yarn.lock
# to the /app working directory
COPY package*.json yarn.lock ./

# Install dependencies in /app
RUN yarn install --network-timeout 1000000

# Copy the rest of our Next.js folder into /app
COPY . .

# Build the Next.js application
RUN yarn build

# Ensure port 3000 is accessible to our system
EXPOSE 1337

# Run yarn start, as we would via the command line 
CMD ["yarn", "start"]

Please replace the existing Dockerfile with the updated one and try running the Docker Compose again.

Unfortunately, the exact version of Docker being used to run the Quivr application is not specified in the provided context. The Dockerfile only specifies the base image for the Docker container, which is a Node.js image, not a Docker version. The Docker version would be determined by the environment in which this Dockerfile is being run, and that information is not provided in the context.

If the issue persists, please provide more information about your Docker version and any other relevant details about your environment. This will help in diagnosing the problem more accurately.

For more information, you can refer to the Dockerfile in the Quivr repository.

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.

abdulkabiraliyu commented 10 months ago

@dosubot

I am also stuck on creating an optimized build during the docker-compose build. I am running Linux unbutu version 20 on aws free tier

=> CACHED [flower 8/8] COPY . . 0.0s => [flower] exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:65714335f8de7e8504dfa7bce4f1c2fecf992b31b90536f30d4cc3c85e632c01 0.0s => => naming to docker.io/stangirard/quivr-backend-prebuilt:latest 0.0s => [frontend deps 1/5] RUN apk add --no-cache libc6-compat python3 make g++ 4.8s => [frontend runner 1/8] WORKDIR /app 0.1s => [frontend runner 2/8] RUN addgroup --system --gid 1001 nodejs 0.9s => [frontend runner 3/8] RUN adduser --system --uid 1001 nextjs 0.8s => [frontend deps 2/5] RUN yarn global add node-gyp 4.3s => [frontend deps 3/5] WORKDIR /app 0.0s => [frontend deps 4/5] COPY package.json yarn.lock package-lock.json pnpm-lock.yaml* ./ 0.2s => [frontend deps 5/5] RUN if [ -f yarn.lock ]; then yarn --frozen-lockfile; elif [ -f package-lock.json ]; then npm ci; elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i 127.7s => [frontend builder 2/4] COPY --from=deps /app/node_modules ./node_modules 43.6s => [frontend builder 3/4] COPY . . 0.9s => [frontend builder 4/4] RUN yarn build 59.3s => => # $ next build => => # Attention: Next.js now collects completely anonymous telemetry regarding usage. => => # This information is used to shape Next.js' roadmap and prioritize features. => => # You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: => => # https://nextjs.org/telemetry => => # - info Creating an optimized production build...

abdulkabiraliyu commented 9 months ago

What happened?

I am trying to run Quivr on a Mac with Sonoma 14.2 (M1 max chip). After I run the docker compose up, it runs for a little bit, but then it gets stuck when building the front end with next, more specifically on this line:

  • info Creating an optimized production build...

Any suggestions what to do?

Relevant log output

[...]
[4/4] Building fresh packages...
Done in 69.69s.
--> e726b19d7e9c
[3/4] STEP 1/17: FROM 65c1498de5cce7da532b9fdb61b194f09e076aec1184c2f67d0888d33c1754ef AS builder
[3/4] STEP 2/17: WORKDIR /app
--> 8823fed6f898
[3/4] STEP 3/17: COPY --from=deps /app/node_modules ./node_modules
--> 5bb3ce19a1e6
[3/4] STEP 4/17: COPY . .
--> 1a52c6416427
[3/4] STEP 5/17: ARG NEXT_PUBLIC_ENV
--> 64127f502070
[3/4] STEP 6/17: ARG NEXT_PUBLIC_BACKEND_URL
--> e1c0164428c9
[3/4] STEP 7/17: ARG NEXT_PUBLIC_SUPABASE_URL
--> 3717aa1b6eb4
[3/4] STEP 8/17: ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
--> d02795bad034
[3/4] STEP 9/17: ARG NEXT_PUBLIC_CMS_URL
--> bddaaed14f07
[3/4] STEP 10/17: ARG NEXT_PUBLIC_FRONTEND_URL
--> 3c418800e892
[3/4] STEP 11/17: ENV NEXT_PUBLIC_ENV=$NEXT_PUBLIC_ENV
--> 82fc12c87da5
[3/4] STEP 12/17: ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
--> 1362d9d48e92
[3/4] STEP 13/17: ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
--> ef56abd451ed
[3/4] STEP 14/17: ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
--> 77c93f502ce9
[3/4] STEP 15/17: ENV NEXT_PUBLIC_CMS_URL=$NEXT_PUBLIC_CMS_URL
--> 44e3ae083620
[3/4] STEP 16/17: ENV NEXT_PUBLIC_FRONTEND_URL=$NEXT_PUBLIC_FRONTEND_URL
--> 50fb63e8e41b
[3/4] STEP 17/17: RUN yarn build
yarn run v1.22.19
$ next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

- info Creating an optimized production build...

Twitter / LinkedIn details

No response

Please sir, how are you able to solve this issue

webyacusa commented 9 months ago

What happened?

I am trying to run Quivr on a Mac with Sonoma 14.2 (M1 max chip). After I run the docker compose up, it runs for a little bit, but then it gets stuck when building the front end with next, more specifically on this line:

  • info Creating an optimized production build...

Any suggestions what to do?

Relevant log output

[...]
[4/4] Building fresh packages...
Done in 69.69s.
--> e726b19d7e9c
[3/4] STEP 1/17: FROM 65c1498de5cce7da532b9fdb61b194f09e076aec1184c2f67d0888d33c1754ef AS builder
[3/4] STEP 2/17: WORKDIR /app
--> 8823fed6f898
[3/4] STEP 3/17: COPY --from=deps /app/node_modules ./node_modules
--> 5bb3ce19a1e6
[3/4] STEP 4/17: COPY . .
--> 1a52c6416427
[3/4] STEP 5/17: ARG NEXT_PUBLIC_ENV
--> 64127f502070
[3/4] STEP 6/17: ARG NEXT_PUBLIC_BACKEND_URL
--> e1c0164428c9
[3/4] STEP 7/17: ARG NEXT_PUBLIC_SUPABASE_URL
--> 3717aa1b6eb4
[3/4] STEP 8/17: ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
--> d02795bad034
[3/4] STEP 9/17: ARG NEXT_PUBLIC_CMS_URL
--> bddaaed14f07
[3/4] STEP 10/17: ARG NEXT_PUBLIC_FRONTEND_URL
--> 3c418800e892
[3/4] STEP 11/17: ENV NEXT_PUBLIC_ENV=$NEXT_PUBLIC_ENV
--> 82fc12c87da5
[3/4] STEP 12/17: ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
--> 1362d9d48e92
[3/4] STEP 13/17: ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
--> ef56abd451ed
[3/4] STEP 14/17: ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
--> 77c93f502ce9
[3/4] STEP 15/17: ENV NEXT_PUBLIC_CMS_URL=$NEXT_PUBLIC_CMS_URL
--> 44e3ae083620
[3/4] STEP 16/17: ENV NEXT_PUBLIC_FRONTEND_URL=$NEXT_PUBLIC_FRONTEND_URL
--> 50fb63e8e41b
[3/4] STEP 17/17: RUN yarn build
yarn run v1.22.19
$ next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

- info Creating an optimized production build...

Twitter / LinkedIn details

No response

Please sir, how are you able to solve this issue

This issue unfortunately is not solvable. I gave up and started using Secure AI tools: https://github.com/SecureAI-Tools/SecureAI-Tools

github-actions[bot] commented 8 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.