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

[FIX] Docker-compose up #748

Closed
14 tasks
JC1738 opened this issue May 24, 2024 · 10 comments
Closed
14 tasks

[FIX] Docker-compose up #748

JC1738 opened this issue May 24, 2024 · 10 comments
Labels
docker fix Fix something that isn't working as expected

Comments

@JC1738
Copy link

JC1738 commented May 24, 2024

Describe the bug

A clear and concise description of what the bug is. Please include what you were expecting to happen vs. what actually happened.

CleanShot 2024-05-24 at 14 47 25

To Reproduce

Steps to reproduce the behavior:

Downloaded the sample docker-compse.yml and updated the user/password and ran docker-compose up

Screenshots

If applicable, add screenshots to help explain your problem.

Platform

  • Server:
    • Cloud-Hosted (https://app.khoj.dev)
    • Self-Hosted Docker
    • Self-Hosted Python package
    • Self-Hosted source code
  • Client:
    • Obsidian
    • Emacs
    • Desktop app
    • Web browser
    • WhatsApp
  • OS:
    • Windows
    • macOS
    • Linux
    • Android
    • iOS

If self-hosted

  • Server Version [e.g. 1.0.1]:

Additional context

Add any other context about the problem here.

@JC1738 JC1738 added the fix Fix something that isn't working as expected label May 24, 2024
@JC1738
Copy link
Author

JC1738 commented May 24, 2024

I tried two different ubuntu machines (pop and regular) running 22.04 and get the same error. I was able to get it to work if I build the docker image. So unblocked, bug still think there is something wrong.

@willlee1995
Copy link

willlee1995 commented May 26, 2024

Same here for linux NAS. I have not tried building from scratch, I am able to work from my windows host, but not in a NAS linux server. Wondering why the log won't show anything in the docker container even I use --verbose=1 to hopefully get the logger show up some errors. No luck now. Still, not blocked.

@ssuukk
Copy link

ssuukk commented May 30, 2024

Same on Synology NAS. Just fails with server-1 exited with code 132, running it manually produces nothing:

root@storage2:~/khoj# docker-compose run server /bin/bash
WARN[0000] /root/khoj/docker-compose.yaml: `version` is obsolete
[+] Creating 1/0
 ✔ Container khoj-database-1  Running                                                                                                                                            0.0s


root@storage2:~/khoj#

Found this in dmesg:

[2869088.218453] traps: python3[21932] trap invalid opcode ip:7f8e2643d25b sp:7ffff75753b0 error:0 in libllama.so[7f8e26321000+135000]

@GabrielLanghans
Copy link

Same error here

@nmathey
Copy link

nmathey commented Jun 9, 2024

Same here on Synology NAS: any workaround available yet?
Should we try specific OS/Arch image https://github.com/khoj-ai/khoj/pkgs/container/khoj?

For now issue happen with release 1.13, 1.12.1 and 1.11.0

@nmathey
Copy link

nmathey commented Jun 9, 2024

Ok all docker images are getting the same issue starting release 1.9.0 included. It DOES work with 1.8.0 and lower (at least the container is up and running)
It might be related to #680 which sounds link with the error you get in dmesg @ssuukk #748 (comment).

@JC1738 maybe we can change the title of this issue to be more precise?

@sabaimran
Copy link
Member

sabaimran commented Jun 9, 2024

Hey guys, I'm trying to reproduce this error. I just did a clean install on my Ubuntu 22.04.2 LTS with 16 GB RAM and it's working fine for me. Do you mind sharing more about your machine specs?

Sometimes when docker containers immediately exit like that, it's because of a memory constraint. You can try increasing the allocated memory to the Docker conatiner You can see some instructions on how to do that here for Linux.

This is happening at first run? Can you try building it again with KHOJ_DEBUG=True in your environment variables and see if that gives you anymore info?

@nmathey
Copy link

nmathey commented Jun 9, 2024

Me and @ssuukk trying to make it work on our Synology NAS. I got my self 16G Ram on it but I think the only thing I can do with memory and cpu is limitation which it is not active, so I guess it is getting all ressource it can I guess.

Yes it did happen on very first run.

I'll try rebuilding with debug on and let you know.

@nmathey
Copy link

nmathey commented Jun 9, 2024

Since the container stop immediately after few seconds I can't get any logs actually.
Here are my NAS specs
Capture d’écran 2024-06-09 à 16 24 30

Here is Docker engine info

  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.1
  Git commit:       5fcb1cf
  Built:            Fri Sep  8 08:18:18 2023
  OS/Arch:          linux/amd64
  Experimental:     false

@debanjum
Copy link
Member

Hey folks, I'm closing this issue as:

  • It's hard to reproduce without more detailed logs
  • It's gone stale as Khoj got a bunch of updates since the issue was opened 4 months ago (including a slicker web UX)

From what I can see, there maybe two different issues being discussed here:

  • @JC1738 Given local docker build worked, I wonder if it was some architecture mismatch issue? E.g Khoj docker image built for amd64, your local machine is used some other architecture
  • @nmathey, @ssuukk For your issue, the setup of llama.cpp, a Khoj dependency for offline chat, does seem like the primary suspect. Khoj may not work with the Celeron J3455 chipset on your Synology NAS. But I don't have access to a Celeron based machine to reproduce this.

Do try self-host the latest Khoj to see if to works for you all?
I've improved the self-hosting documentation and Docker setup in #919. So hopefully the setup experience is easier 🤞🏽

@debanjum debanjum closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker fix Fix something that isn't working as expected
Projects
None yet
Development

No branches or pull requests

7 participants