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

Docker cannot write index #1345

Open
ktk opened this issue May 14, 2024 · 1 comment
Open

Docker cannot write index #1345

ktk opened this issue May 14, 2024 · 1 comment

Comments

@ktk
Copy link

ktk commented May 14, 2024

I'm trying to get some samples working again for myself and I try to figure out what to do.

In the Dockerfile, it gives an example how to run the indexer.

I run docker as root on this test server so I would not expect any permission issues but I get:

root@myhost /srv/qlever-home # DB=pagerank; docker run -it --rm -v "$(pwd)":/index --entrypoint bash --name qlever.$DB-index adfreiburg/qlever -c "IndexBuilderMain -f /index/$DB.nt.gz -i /index/$DB -s /index/$DB.settings.json | tee /index/$DB.index-log.txt"; rm -f $DB/*tmp*
tee: /index/pagerank.index-log.txt: Permission denied
2024-05-14 12:32:15.642 - INFO: QLever IndexBuilder, compiled on Mon May  6 10:34:56 UTC 2024 using git hash 8ffe9a
2024-05-14 12:32:15.642 - ERROR: ! ERROR opening file "/index/.stxxl" with mode "w" (Permission denied)

And somewhat related: I saw there are hints about a MacOS build in the git commits but I can't seem to find a binary anywhere, is one published? If so, where?

@hannahbast
Copy link
Member

@ktk Have you tried https://pypi.org/project/qlever ? You can simply install it with pip3 install qlever and from then on it's self-explanatory. The script can either run the various commands for you, or you can just use it to show you the native commands and (modify them) and run them yourself. For example, qlever index --show will show you the command for building the index. The script wants a Qleverfile. You can download one of the preconfigured ones using qlever setup-config ... and modify it according to your needs.

It's a common problem with Docker that you don't have access to a directory even when running as root. In particular (but not only), this happens for directories mounted via NFS. One solution is to run docker with option -u $(id -u):$(id -g). A simple workaround is to just make the directory writable for everyone using chmod 777 ....

You find two (non-official) binaries for macOS 12 here: https://ad-research.cs.uni-freiburg.de/downloads/qlever/macos-12. They have been built using Conan, so they will probably not run out of the box. To natively compile the binaries on macOS yoursel, you can follow the respective workflow: https://github.com/ad-freiburg/qlever/actions/runs/9062897737/job/24897720197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants