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

Unable to load sqlite-vec extensions in docker environment #1543

Closed
iankm opened this issue Dec 28, 2024 · 10 comments
Closed

Unable to load sqlite-vec extensions in docker environment #1543

iankm opened this issue Dec 28, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@iankm
Copy link
Contributor

iankm commented Dec 28, 2024

Describe the bug

Upon building the docker container and running locally, I am unable to start my agent. The agent works when I build in my local terminal.

When I run the docker container, I receive the issue in the provided screenshot.

I mainly interact with my agent via the Discord client. When I run locally, it responds to my messages and I can see the logs in terminal. When I run via docker, this does not occur.

To Reproduce

  1. Run docker build -t latest .
  2. Run docker run latest

Expected behavior

I should be able to interact with my agent via Discord and see the appropriate logs in my terminal.

Screenshots

CleanShot 2024-12-28 at 14 38 51@2x

Additional context

@iankm iankm added the bug Something isn't working label Dec 28, 2024
Copy link
Contributor

Hello @iankm! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!

@IntrinsiCrypto
Copy link

Can reproduce the issue, seems this is because the package doesn't have a linux-arm64 target: asg017/sqlite-vec#148

@HashWarlock
Copy link
Collaborator

HashWarlock commented Dec 30, 2024

Can you try running:
docker buildx build --platform=linux/amd64 -t eliza:latest . Then try to run the container?

@iankm
Copy link
Contributor Author

iankm commented Dec 30, 2024

Will do

@iankm
Copy link
Contributor Author

iankm commented Dec 31, 2024

This worked! Thank you

@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 2, 2025

This issue should be closed.

@Lomank123
Copy link

Lomank123 commented Jan 4, 2025

Greetings, stumbled upon the same issue. Tried to run docker buildx build --platform=linux/amd64 -t eliza:latest . as @HashWarlock suggested but now it returns different errors during the build stage. I'm running it on Macbook Pro M2 if it may help.

Stacktrace 1 (during first try):

199.4 node_modules/@discordjs/opus install: gyp ERR! build error 
199.4 node_modules/@discordjs/opus install: gyp ERR! stack Error: `make` failed with exit code: 2
199.4 node_modules/@discordjs/opus install: gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:209:23)
199.4 node_modules/@discordjs/opus install: gyp ERR! System Linux 6.10.14-linuxkit
199.4 node_modules/@discordjs/opus install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36/opus.node" "--module_name=opus" "--module_path=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
199.4 node_modules/@discordjs/opus install: gyp ERR! cwd /app/node_modules/@discordjs/opus
199.4 node_modules/@discordjs/opus install: gyp ERR! node -v v23.3.0
199.4 node_modules/@discordjs/opus install: gyp ERR! node-gyp -v v10.1.0
199.4 node_modules/@discordjs/opus install: gyp ERR! not ok 
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! build error 
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36/opus.node --module_name=opus --module_path=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/app/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1101:16)
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! System Linux 6.10.14-linuxkit
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/@discordjs/opus/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! cwd /app/node_modules/@discordjs/opus
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! node -v v23.3.0
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! node-pre-gyp -v v0.4.5
199.4 node_modules/@discordjs/opus install: node-pre-gyp ERR! not ok 
199.4 node_modules/@discordjs/opus install: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36/opus.node --module_name=opus --module_path=/app/node_modules/@discordjs/opus/prebuild/node-v131-napi-v3-linux-x64-glibc-2.36 --napi_version=9 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
199.5 node_modules/@discordjs/opus install: Failed
199.5  ELIFECYCLE  Command failed with exit code 1.
--------------------
  26 |     # Install dependencies and build the project
  27 | >>> RUN pnpm install \
  28 | >>>     && pnpm build-docker \
  29 | >>>     && pnpm prune --prod
  30 |     
--------------------

Stacktrace 2 (second try):

67.45 node_modules/canvas install: /bin/sh: 1: pkg-config: not found
67.45 node_modules/canvas install: gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
67.49 node_modules/canvas install: gyp ERR! configure error 
67.49 node_modules/canvas install: gyp ERR! stack Error: `gyp` failed with exit code: 1
67.49 node_modules/canvas install: gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/configure.js:297:18)
67.49 node_modules/canvas install: gyp ERR! stack at ChildProcess.emit (node:events:513:28)
67.49 node_modules/canvas install: gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
67.49 node_modules/canvas install: gyp ERR! System Linux 6.10.14-linuxkit
67.49 node_modules/canvas install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=/app/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/app/node_modules/canvas/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v131"
67.49 node_modules/canvas install: gyp ERR! cwd /app/node_modules/canvas
67.49 node_modules/canvas install: gyp ERR! node -v v23.3.0
67.49 node_modules/canvas install: gyp ERR! node-gyp -v v10.1.0
67.49 node_modules/canvas install: gyp ERR! not ok 
67.50 node_modules/bigint-buffer install: gyp info it worked if it ends with ok
67.50 node_modules/bigint-buffer install: gyp info using [email protected]
67.50 node_modules/bigint-buffer install: gyp info using [email protected] | linux | x64
67.51 node_modules/canvas install: node-pre-gyp ERR! build error 
67.52 node_modules/canvas install: node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/app/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
67.52 node_modules/canvas install: node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
67.52 node_modules/canvas install: node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
67.52 node_modules/canvas install: node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1101:16)
67.52 node_modules/canvas install: node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
67.52 node_modules/canvas install: node-pre-gyp ERR! System Linux 6.10.14-linuxkit
67.52 node_modules/canvas install: node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
67.52 node_modules/canvas install: node-pre-gyp ERR! cwd /app/node_modules/canvas
67.52 node_modules/canvas install: node-pre-gyp ERR! node -v v23.3.0
67.52 node_modules/canvas install: node-pre-gyp ERR! node-pre-gyp -v v1.0.11
67.52 node_modules/canvas install: node-pre-gyp ERR! not ok 
67.52 node_modules/canvas install: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/app/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/app/node_modules/canvas/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
67.54 node_modules/canvas install: Failed
...
336.3 @elizaos/plugin-cronoszkevm:build: CLI Building entry: src/index.ts
336.3 @elizaos/plugin-cronoszkevm:build: CLI Using tsconfig: tsconfig.json
336.3 @elizaos/plugin-conflux:build: cache miss, executing 994335a9c33b2e45
336.3 @elizaos/plugin-coinbase:build: cache miss, executing a4f49a1272311c50
336.3 @elizaos/adapter-supabase:build: cache miss, executing 82b519d103d31e74
336.3 @elizaos/plugin-intiface:build: cache miss, executing c1e654c1d0d13290
336.3 @elizaos/plugin-video-generation:build: cache miss, executing 3a72be7e63e31365
336.3 @elizaos/plugin-evm:build: cache miss, executing 8ddfd5c17988009c
336.3 @elizaos/plugin-whatsapp:build: cache miss, executing 714bfad8c3425054
336.3 @elizaos/client-auto:build: cache miss, executing f5f3357bbfc42125
336.3 @elizaos/plugin-trustdb:build: cache miss, executing 9a83a4b03b258284
336.3 @elizaos/plugin-starknet:build: cache miss, executing 0884e521ff219b46
336.3 @elizaos/plugin-web-search:build: cache miss, executing d9ac8aaea81b4291
336.3 @elizaos/plugin-twitter:build: cache miss, executing 35e1e03f8812093b
336.4 @elizaos/client-twitter:build: cache miss, executing 36bb11404d132189
336.4 @elizaos/plugin-abstract:build: cache miss, executing 3cd03e7053a13611
336.4 @elizaos/plugin-image-generation:build: cache miss, executing 34d58de704feb4b1
336.4 @elizaos/plugin-ton:build: cache miss, executing e306bae00b54ce9e
336.4 @elizaos/plugin-bootstrap:build: cache miss, executing 2422158cea8cdf65
336.4 @elizaos/plugin-goat:build: cache miss, executing 75d039a8b66a477c
336.4 @elizaos/plugin-sui:build: cache miss, executing 998f51ed17acf2e3
336.4 @elizaos/plugin-flow:build: cache miss, executing 6c8b6d67e3ea6a3e
336.4 @elizaos/plugin-gitbook:build: cache miss, executing 4ad2da20049a00f9
336.4 @elizaos/client-farcaster:build: cache miss, executing 7ea224138dcc22f0
336.4 @elizaos/plugin-multiversx:build: cache miss, executing 5d0f7fbe1d923242
336.4 @elizaos/plugin-story:build: cache miss, executing 2d43b0a26a569490
336.4 @elizaos/plugin-3d-generation:build: cache miss, executing 7f4509c6a3c7d410
336.4 @elizaos/plugin-icp:build: cache miss, executing 4141af82c380ccc2
336.4 @elizaos/plugin-avalanche:build: cache miss, executing 0df1b628a62b2ce0
336.4 @elizaos/adapter-postgres:build: cache miss, executing 9c2cc60f58a45713
336.6   x internal errors encountered: external process killed a task
336.6 
336.6  ELIFECYCLE  Command failed with exit code 1
--------------------
  26 |     # Install dependencies and build the project
  27 | >>> RUN pnpm install \
  28 | >>>     && pnpm build-docker \
  29 | >>>     && pnpm prune --prod
  30 |     
--------------------

Does anyone faced the same? I would appreciate any help on that.

@HashWarlock
Copy link
Collaborator

Are you running DockerHub or Orbstack? Orbstack is better for building docker for platform= linux/amd64

@Lomank123
Copy link

DockerHub. I've resolved the issue by following zxflows' answer in "ElizaOS Development" Discord channel. To fix it, in Docker Desktop general settings I've changed Virtual Machine option to "Docker VMM" instead of "Apple Virtualization Framework" and built the image. Many thanks

Discord message link: https://discord.com/channels/1051457140637827122/1323727516745334785/1325014844075937792

@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 6, 2025

Closing this issue because not related to the general avaiable code.
Anyway @HashWarlock It will be good practice to add this information to the docs.
https://discord.com/channels/1051457140637827122/1323727516745334785/1325014844075937792

@AIFlowML AIFlowML closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants