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 install on arm64 Macbook - indexing fails #122

Open
rat10 opened this issue Jan 29, 2025 · 0 comments
Open

Docker install on arm64 Macbook - indexing fails #122

rat10 opened this issue Jan 29, 2025 · 0 comments

Comments

@rat10
Copy link

rat10 commented Jan 29, 2025

[I hope that this is the right place to post this issue. Feel free to redirect me]
I'm trying to install adfreiburg/qlever:latest on a Macbook with M4 processor with Docker. I'm quite clumsy with the command line etc, but I made it through the first steps. Indexing however fails.

Somehow I got QLever running as a Docker container with the Olympics dataset, queryable via the browser interface. That is obviously great, but now I'd like to test it on my own data. However, after successfully editing a Qleverfile to curl my data (it would have been easier to just copy the file into the data directory, as I later realized) I'm stuck with the next step, indexing. I hope the following excerpts are complete enough for you to figure out what's going wrong:

Mac: cd /Users/me/qlever 
Mac: docker run -it --name qlever -p 7001:7001 --rm -e UID=$(id -u) -e GID=1001 -v $(pwd):/data -w /data adfreiburg/qlever
qlever@docker:data$ cd ng
qlever@docker:ng$ ls
Qleverfile  ng.settings.json  ng.trig
qlever@docker:ng$ qlever index

Command: index

echo '{ "ascii-prefixes-only": false, "num-triples-per-batch": 100000 }' > ng.settings.json
docker run --rm -u $(id -u):$(id -g) -v /etc/localtime:/etc/localtime:ro -v $(pwd):/index -w /index --init --entrypoint bash --name qlever.index.ng docker.io/adfreiburg/qlever:latest -c 'cat ng.trig | IndexBuilderMain -i ng -s ng.settings.json -F ttl -f - --stxxl-memory 5G | tee ng.index-log.txt'

Building the index failed: /usr/bin/bash: line 1: docker: command not found

qlever@docker:ng$ 

ChatGPT o1 figured that this is an attempt to run Docker within Docker and proposed to run IndexBuilderMain -i ./ng ./ng/ng.trig -F ttl --stxxl-memory 1G directly and so I did:

qlever@docker:ng$ IndexBuilderMain -i . ./ng.trig  -F ttl --stxxl-memory 1G
2025-01-29 10:58:05.866 - INFO: QLever IndexBuilder, compiled on Wed Jan 22 12:51:19 UTC 2025 using git hash d7ec9b
2025-01-29 10:58:05.868 - ERROR: Assertion `!fileSpecifications.empty()` failed. Please report this to the developers. In file "/qlever/src/index/IndexBuilderMain.cpp " at line 329
qlever@docker:ng$ 

So I'm reporting, although I somehow doubt that this is an issue with Qlever, or the root of my problem (but it seems like a good enough excuse to ask for help ;-). Here is a link to the trig file. and this is the Qleverfile:

# Qleverfile derived from Olympics, use with https://github.com/ad-freiburg/qlever-control

[data]
NAME               = ng
BASE_URL           = https://github.com/rat10/nng/tree/main
GET_DATA_CMD       = curl -slo ng.trig https://raw.githubusercontent.com/rat10/nng/refs/heads/main/ramblings/rdf.ng%20since%20dec%2024/jan25%20data.trig
DESCRIPTION        = silly example data
TEXT_DESCRIPTION   = no literals

[index]
INPUT_FILES        = ng.trig
CAT_INPUT_FILES    = cat ${INPUT_FILES}
SETTINGS_JSON      = { "ascii-prefixes-only": false, "num-triples-per-batch": 100000 }

[server]
PORT               = 7777
ACCESS_TOKEN       = tl
MEMORY_FOR_QUERIES = 5G
CACHE_MAX_SIZE     = 2G
TIMEOUT            = 30s

[runtime]
SYSTEM = docker
IMAGE  = docker.io/adfreiburg/qlever:latest

[ui]
UI_CONFIG = ng


A remark concerning the Mac: I first tried to run QLever with this command docker run -it --rm -e UID=$(id -u) -e GID=$(id -g) -v $(pwd):/data -w /data qlever -c "qlever setup-config olympics && qlever get-data && qlever index" (the container provided this on the shell). However, the GID parameter generated by this command seems to clash with a Mac preset. ChatGPT suggested to use some other number, and that worked (see below). If I omit the ID parameters, the container won't start, e.g.:

Mac:qlever t$ docker run  -it --name qlever -p 7001:7001 --rm -v $(pwd):/data -w /data adfreiburg/qlever

groupmod: invalid group ID 'qlever'
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

1 participant