Open yodaphone opened 1 week ago
Hey @yodaphone! I'm here to help you with any bugs or questions you have. I'm a bot that can assist with problem-solving and providing guidance for becoming a contributor.
I found a similar closed issue that might help you resolve the "pull access denied for quivr-backend-api" error:
To resolve your specific issue, follow these steps:
quivr-backend-api
image locally: The quivr-backend-api
image needs to be built locally since it is not available for pulling from a remote repository. The docker-compose.dev.yml
file indicates that the backend-api
service should be built from the local backend
directory.Here is the relevant section from the docker-compose.dev.yml
file:
backend-api:
image: backend-api:latest
extra_hosts:
- "host.docker.internal:host-gateway"
pull_policy: never
env_file:
- .env
build:
context: backend
dockerfile: Dockerfile.dev
cache_from:
- backend-api:latest
args:
- DEV_MODE=true
container_name: backend-api
volumes:
- ./backend/:/app/
command: >
/bin/bash -c "python -m uvicorn quivr_api.main:app --host 0.0.0.0 --log-level info --reload --port 5050"
restart: always
ports:
- 5050:5050
- 5678:5678 # debug port
backend
directory with the necessary Dockerfile and source code. Run the following command to build the backend-api
image locally:docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up
Additionally, ensure you have followed the prerequisites and initial setup steps as outlined in the Quivr README:
git clone https://github.com/quivrhq/quivr.git && cd quivr
.env.example
file to .env
:cp .env.example .env
.env
file with your OPENAI_API_KEY
:vim .env # or use any text editor
cd backend && supabase start
cd ../
docker compose pull
docker compose up
By following these steps, you will build the backend-api
image locally and use it for the backend-api
service, resolving the "pull access denied" error [2][3][4].
To continue talking to Dosu, mention @dosu.
@dosu i tried these and got the 1st part done
docker-compose -f docker-compose.dev.yml up & have the containers running. when i access http://ipaddress:5050, the page is blank.
do i have to modify the docker-compose.yml file thats in the quivr folder to point to the local builds?
Yes, you need to modify the docker-compose.yml
file in the Quivr folder to point to the local builds if the page is blank when accessing the service at http://ipaddress:5050. Specifically, you should ensure that the image
fields for the frontend
and backend-api
services are set to use the local builds instead of prebuilt images.
Here is the modified docker-compose.yml
file:
version: "3.8"
services:
frontend:
build:
context: frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_ENV=local
- NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL}
- NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY}
- NEXT_PUBLIC_CMS_URL=${NEXT_PUBLIC_CMS_URL}
- NEXT_PUBLIC_FRONTEND_URL=${NEXT_PUBLIC_FRONTEND_URL}
- NEXT_PUBLIC_AUTH_MODES=${NEXT_PUBLIC_AUTH_MODES}
container_name: web
depends_on:
- backend-api
restart: always
ports:
- 3000:3000
backend-api:
image: backend-api:latest
extra_hosts:
- "host.docker.internal:host-gateway"
pull_policy: never
env_file:
- .env
build:
context: backend
dockerfile: Dockerfile.dev
cache_from:
- backend-api:latest
args:
- DEV_MODE=true
container_name: backend-api
volumes:
- ./backend/:/app/
command: >
/bin/bash -c "python -m uvicorn quivr_api.main:app --host 0.0.0.0 --log-level info --reload --port 5050"
restart: always
ports:
- 5050:5050
- 5678:5678 # debug port
worker:
pull_policy: never
image: backend-api:latest
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
container_name: worker
volumes:
- ./backend/:/app/
command: >
/bin/bash -c "python -m celery -A quivr_worker.celery_worker worker -l info -E"
restart: always
depends_on:
- redis
notifier:
pull_policy: never
image: backend-api:latest
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
container_name: notifier
volumes:
- ./backend/:/app/
command: >
/bin/bash -c "python /app/worker/quivr_worker/celery_monitor.py"
restart: always
depends_on:
- redis
- worker
beat:
image: backend-api:latest
pull_policy: never
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
container_name: beat
command: >
/bin/bash -c "python -m celery -A quivr_worker.celery_worker beat -l info"
volumes:
- ./backend/:/app/
restart: always
depends_on:
- redis
flower:
image: backend-api:latest
pull_policy: never
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
container_name: flower
command: >
/bin/bash -c "python -m celery -A quivr_worker.celery_worker flower -l info --port=5555"
volumes:
- ./backend/:/app/
restart: always
depends_on:
- redis
- worker
- beat
ports:
- 5555:5555
redis:
image: redis:latest
container_name: redis
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
ports:
- 6379:6379
networks:
quivr-network:
driver: bridge
This configuration ensures that the frontend
and backend-api
services are built from the local Dockerfiles instead of using prebuilt images [1].
To continue talking to Dosu, mention @dosu.
@dosu i'm a bit lost with this step
docker-compose -f docker-compose.dev.yml up
after i do this & keep the containers running, do I also have to run
docker compose up with the modified docker-compose.yml file?
thats what I did and I'm getting this error
docker compose up -d
[+] Building 135.4s (13/21) docker:default
=> [frontend internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 3.23kB 0.0s
=> [frontend internal] load metadata for docker.io/library/node:18.19.0-alpine 0.2s
=> [frontend internal] load .dockerignore 0.0s
=> => transferring context: 340B 0.0s
=> [frontend internal] load build context 0.2s
=> => transferring context: 72.28kB 0.1s
=> [frontend base 1/1] FROM docker.io/library/node:18.19.0-alpine@sha256:0085670310d2879621f96a4216c893f92e2ded827e9e6ef8437672e1bd72f437 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
=> CACHED [frontend deps 1/5] RUN apk add --no-cache libc6-compat python3 make g++ 0.0s
=> CACHED [frontend deps 2/5] RUN yarn global add node-gyp 0.0s
=> CACHED [frontend deps 3/5] WORKDIR /app 0.0s
=> CACHED [frontend deps 4/5] COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ 0.0s
=> ERROR [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 --frozen-lockfile; e 134.7s
------
> [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 --frozen-lockfile; else echo "Lockfile not found." && exit 1; fi:
0.946 yarn install v1.22.19
1.166 [1/4] Resolving packages...
2.640 [2/4] Fetching packages...
94.25 warning chart.js@4.4.2: The engine "pnpm" appears to be invalid.
94.31 [3/4] Linking dependencies...
94.34 warning " > @testing-library/user-event@14.5.1" has unmet peer dependency "@testing-library/dom@>=7.21.4".
94.36 warning " > @typescript-eslint/eslint-plugin@5.62.0" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
94.37 warning " > react-katex@3.0.1" has unmet peer dependency "prop-types@^15.8.1".
94.37 warning " > @vitejs/plugin-react@4.0.4" has unmet peer dependency "vite@^4.2.0".
130.7 [4/4] Building fresh packages...
131.7 error /app/node_modules/@sentry/cli: Command failed.
131.7 Exit code: 1
131.7 Command: node ./scripts/install.js
131.7 Arguments:
131.7 Directory: /app/node_modules/@sentry/cli
131.7 Output:
131.7 [sentry-cli] Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.77.3/sentry-cli-Linux-x86_64
131.7 Error: Unable to download sentry-cli binary from https://downloads.sentry-cdn.com/sentry-cli/1.77.3/sentry-cli-Linux-x86_64.
131.7 Error code: ECONNREFUSED
131.7 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
failed to solve: process "/bin/sh -c 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 --frozen-lockfile; else echo \"Lockfile not found.\" && exit 1; fi" did not complete successfully: exit code: 1
What happened?
A bug happened!
Follow the instructions and got this error when i want to set up quivr locally. I also followed this #2950 but it didnt work for me.
Relevant log output
Twitter / LinkedIn details
No response