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

Following Quickstart failes with docker build issue #556

Closed
WolfgangFahl opened this issue Jan 27, 2022 · 11 comments
Closed

Following Quickstart failes with docker build issue #556

WolfgangFahl opened this issue Jan 27, 2022 · 11 comments

Comments

@WolfgangFahl
Copy link

date;docker build -t qlever .;date
Thu Jan 27 09:41:40 CET 2022
[+] Building 11.7s (8/19)                                                       
 => [internal] load .dockerignore                                          0.1s
 => => transferring context: 173B                                          0.0s
 => [internal] load build definition from Dockerfile                       0.1s
 => => transferring dockerfile: 2.23kB                                     0.0s
 => [internal] load metadata for docker.io/library/ubuntu:21.10            2.9s
 => [internal] load build context                                          4.3s
 => => transferring context: 122.68MB                                      3.8s
 => [base 1/1] FROM docker.io/library/ubuntu:21.10@sha256:cfc189b67f53b32  6.3s
 => => resolve docker.io/library/ubuntu:21.10@sha256:cfc189b67f53b322b0ce  0.0s
 => => sha256:cfc189b67f53b322b0ceaabacfc9e2414c63435f362 1.42kB / 1.42kB  0.0s
 => => sha256:28941e0c8e9be8c6aa586be8c7ae3074c81ed915cb5b583 529B / 529B  0.0s
 => => sha256:64c59b1065b1ea628a7253ea0e5e87234e764fe3612 1.46kB / 1.46kB  0.0s
 => => sha256:688b037d2a94faed4d0a662851a3612e2a23a9e0e 30.38MB / 30.38MB  4.6s
 => => extracting sha256:688b037d2a94faed4d0a662851a3612e2a23a9e0e2636b9f  1.3s
 => ERROR [builder 1/8] RUN apt-get update && apt-get install -y build-es  2.4s
 => [runtime 1/6] WORKDIR /app                                             1.2s
 => ERROR [runtime 2/6] RUN apt-get update && apt-get install -y wget pyt  1.1s
------                                                                          
 > [builder 1/8] RUN apt-get update && apt-get install -y build-essential cmake libicu-dev tzdata pkg-config uuid-runtime uuid-dev git:                         
#9 1.725 Get:1 http://archive.ubuntu.com/ubuntu impish InRelease [270 kB]       
#9 1.881 Get:2 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
#9 1.942 Get:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease [110 kB]
#9 2.028 Err:1 http://archive.ubuntu.com/ubuntu impish InRelease
#9 2.028   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.038 Get:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
#9 2.108 Err:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease
#9 2.108   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.190 Err:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease
#9 2.190   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.303 Err:2 http://security.ubuntu.com/ubuntu impish-security InRelease
#9 2.303   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.309 Reading package lists...
#9 2.326 W: GPG error: http://archive.ubuntu.com/ubuntu impish InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.327 E: The repository 'http://archive.ubuntu.com/ubuntu impish InRelease' is not signed.
#9 2.327 W: GPG error: http://archive.ubuntu.com/ubuntu impish-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.327 E: The repository 'http://archive.ubuntu.com/ubuntu impish-updates InRelease' is not signed.
#9 2.327 W: GPG error: http://archive.ubuntu.com/ubuntu impish-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.327 E: The repository 'http://archive.ubuntu.com/ubuntu impish-backports InRelease' is not signed.
#9 2.327 W: GPG error: http://security.ubuntu.com/ubuntu impish-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#9 2.327 E: The repository 'http://security.ubuntu.com/ubuntu impish-security InRelease' is not signed.
------
------
 > [runtime 2/6] RUN apt-get update && apt-get install -y wget python3-yaml unzip curl bzip2 pkg-config libicu-dev python3-icu libgomp1 uuid-runtime:
#6 0.495 Get:1 http://archive.ubuntu.com/ubuntu impish InRelease [270 kB]
#6 0.650 Get:2 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
#6 0.718 Get:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease [110 kB]
#6 0.795 Err:1 http://archive.ubuntu.com/ubuntu impish InRelease
#6 0.795   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 0.820 Get:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
#6 0.877 Err:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease
#6 0.877   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 0.965 Err:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease
#6 0.965   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.069 Err:2 http://security.ubuntu.com/ubuntu impish-security InRelease
#6 1.069   gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.077 Reading package lists...
#6 1.093 W: GPG error: http://archive.ubuntu.com/ubuntu impish InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.093 E: The repository 'http://archive.ubuntu.com/ubuntu impish InRelease' is not signed.
#6 1.093 W: GPG error: http://archive.ubuntu.com/ubuntu impish-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.093 E: The repository 'http://archive.ubuntu.com/ubuntu impish-updates InRelease' is not signed.
#6 1.093 W: GPG error: http://archive.ubuntu.com/ubuntu impish-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.093 E: The repository 'http://archive.ubuntu.com/ubuntu impish-backports InRelease' is not signed.
#6 1.093 W: GPG error: http://security.ubuntu.com/ubuntu impish-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
#6 1.093 E: The repository 'http://security.ubuntu.com/ubuntu impish-security InRelease' is not signed.
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c apt-get update && apt-get install -y wget python3-yaml unzip curl bzip2 pkg-config libicu-dev python3-icu libgomp1 uuid-runtime]: runc did not terminate sucessfully
Thu Jan 27 09:41:52 CET 2022
@WolfgangFahl
Copy link
Author

seems this might be related to https://stackoverflow.com/questions/66319610/gpg-error-in-ubuntu-21-04-after-second-apt-get-update-during-docker-build - I was trying this on a 12 core 64 GB Mac with an older docker version. I will retry on an ubuntu machine.

@joka921
Copy link
Member

joka921 commented Jan 27, 2022

Hello and thanks for your interest in the QLever project. Your stack overflow link says, that possible fixes are a newer Docker version or an older base image. In the Dockerfiles subfolder of the project you find Dockerfiles for QLever based on Ubuntu 18.04 and Ubuntu 20.04, maybe those work with your Mac-Docker setup (explicitly specify a Dockerfile with -f <pathToDockerfile> in the docker build command.

We have never tried using QLever on a machine where the native OS is not a Linux, but we will be interested in how well this works.

@WolfgangFahl
Copy link
Author

WolfgangFahl commented Jan 27, 2022

Thx for the quick response

date;docker build --file Dockerfiles/Dockerfile.Ubuntu20.04 -t qlever .;date
Thu Jan 27 10:21:46 CET 2022
[+] Building 1484.6s (21/25)                                                    
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 35B                                           0.0s
 => [internal] load build definition from Dockerfile.Ubuntu20.04           0.0s
 => => transferring dockerfile: 2.47kB                                     0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04            1.8s
 => [base 1/6] FROM docker.io/library/ubuntu:20.04@sha256:b5a61709a9a4428  6.0s
 => => resolve docker.io/library/ubuntu:20.04@sha256:b5a61709a9a44284d88f  0.0s
 => => sha256:ea362f368469f909a95f9a6e54ebe0121ce0a8e3c 28.57MB / 28.57MB  4.4s
 => => sha256:b5a61709a9a44284d88fb12e5c48db0409cfad5b69d 1.42kB / 1.42kB  0.0s
 => => sha256:57df66b9fc9ce2947e434b4aa02dbe16f6685e20db0c170 529B / 529B  0.0s
 => => sha256:d13c942271d66cb0954c3ba93e143cd253421fe0772 1.46kB / 1.46kB  0.0s
 => => extracting sha256:ea362f368469f909a95f9a6e54ebe0121ce0a8e3c30583dd  1.3s
 => [internal] load build context                                          0.4s
 => => transferring context: 437.98kB                                      0.3s
 => [base 2/6] RUN apt-get update                                          6.4s
 => [base 3/6] RUN apt install -y software-properties-common              39.4s
 => [base 4/6] RUN add-apt-repository -y ppa:mhier/libboost-latest         4.4s 
 => [base 5/6] RUN add-apt-repository ppa:ubuntu-toolchain-r/test          4.0s 
 => [base 6/6] RUN apt-get update                                          2.8s 
 => [builder 1/9] RUN apt-get install -y build-essential cmake libicu-de  38.1s 
 => [runtime 1/6] WORKDIR /app                                             0.0s 
 => [runtime 2/6] RUN apt-get update && apt-get install -y wget python3-  21.7s 
 => [runtime 3/6] RUN apt install -y lbzip2 libjemalloc-dev libzstd-dev    4.4s
 => [runtime 4/6] RUN groupadd -r qlever && useradd --no-log-init -r -u 1  0.6s
 => [builder 2/9] RUN apt install -y gcc-11 g++-11                        17.0s
 => [builder 3/9] RUN apt install -y libjemalloc-dev ninja-build libzstd-  3.8s
 => [builder 4/9] RUN apt install -y libboost1.74-dev                      9.9s
 => [builder 5/9] COPY . /app/                                             2.9s
 => [builder 6/9] WORKDIR /app/                                            0.0s
 => [builder 7/9] WORKDIR /app/build/                                      0.0s
 => [builder 8/9] RUN cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COM  1348.0s
 => => # [81/571] Building CXX object CMakeFiles/PrefixHeuristicEvaluatorMain.d
 => => # ir/src/PrefixHeuristicEvaluatorMain.cpp.o                             
 => => # [82/571] Building CXX object third_party/abseil-cpp/absl/strings/CMake
 => => # Files/absl_cord.dir/cord.cc.o                                         
 => => # [83/571] Building CXX object third_party/antlr4/runtime/Cpp/runtime/CM
 => => # akeFiles/antlr4_static.dir/src/BufferedTokenStream.cpp.o              
Thu Jan 27 10:46:31 CET 2022

finished after 1484 secs

The environment is a Mid 2010 Mac pro Running Mac OS 10.13.6 High Sierra. The docker environment ist docker desktop community version 2.5.0.1 (49550) with Engine 19.03.13

@joka921
Copy link
Member

joka921 commented Jan 27, 2022

Was this a succesful run? I am missing step 9/9 and some kind of success message, but there also is no error and I am not used to the output of this particular Docker version.

Just let us know, if you have further questions, or a particular use case for QLever.

@WolfgangFahl
Copy link
Author

@joka921 just tried to send you a personal mail regarding https://wiki.bitplan.com/index.php/Get_your_own_copy_of_WikiData. Would you like to see a separate ticket for adding your solution to https://wiki.bitplan.com/index.php/Get_your_own_copy_of_WikiData#Performance_Reports ?

@WolfgangFahl
Copy link
Author

After the hints from #563 I adapted the script from #562 for Mac OS with an old docker. The result seems a bit strange:

./qlever -aw
operating system
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G14033
docker version
Docker version 19.03.13, build 4484c46d9d
memory
./qlever: line 102: free: command not found
diskspace
pulling qlever docker image started at Sun Jan 30 14:29:57 CET 2022
Using default tag: latest
latest: Pulling from adfreiburg/qlever
Digest: sha256:036bde7c6e675c3cf34cfa3f87513af8a43dbd83be736ca83f21c244dfee91f2
Status: Image is up to date for adfreiburg/qlever:latest
docker.io/adfreiburg/qlever:latest
pulling qlever docker image finished at Sun Jan 30 14:29:59 CET 2022 after 2 seconds
wikidata dump already downloaded
creating wikidata index started at Sun Jan 30 14:29:59 CET 2022
2022-01-30 13:30:03.292	- INFO:  QLever IndexBuilder, compiled on Jan 29 2022 20:19:12
2022-01-30 13:30:03.417	- INFO:  You specified the input format: TTL
2022-01-30 13:30:03.442	- INFO:  You specified "locale = en_US" and "ignore-punctuation = 1"
2022-01-30 13:30:03.444	- INFO:  You specified "ascii-prefixes-only = true", which enables faster parsing for well-behaved TTL files (see qlever/docs on GitHub)
2022-01-30 13:30:03.444	- INFO:  You specified "num-triples-per-partial-vocab = 10,000,000", choose a lower value if the index builder runs out of memory
2022-01-30 13:30:03.446	- INFO:  Processing input triples from /dev/stdin ...
2022-01-30 15:28:29.931	- INFO:  Input triples processed: 100,000,000
2022-01-30 15:35:05.262	- INFO:  Input triples processed: 200,000,000
2022-01-30 15:41:14.692	- INFO:  Input triples processed: 300,000,000
2022-01-30 15:47:24.119	- INFO:  Input triples processed: 400,000,000
2022-01-30 15:53:49.298	- INFO:  Input triples processed: 500,000,000
2022-01-30 16:00:24.711	- INFO:  Input triples processed: 600,000,000
2022-01-30 16:06:09.271	- INFO:  Input triples processed: 700,000,000
2022-01-30 16:12:37.717	- INFO:  Input triples processed: 800,000,000

it takes a full 2 h before the first output appears in the log. It's just by chance that i let the computer run after no output showed up after 15 mins ... the docker stats show some 17 GB memory usage and 300 to 800% CPU usage so i assume multiple cores are at work.

@hannahbast
Copy link
Member

There are two phenomena here:

  1. Log output not showing. That has something to do with docker or the interaction between docker and your OS.
  2. It's six times slower than it should be. Either you machine is slow or docker on your machine or both.

You don't have to use docker. The two Dockerfiles in https://github.com/ad-freiburg/qlever/tree/master/Dockerfiles tell you exactly what you have to install and how (for Ubuntu 18 and for Ubuntu 20), so that you can run QLever natively.

@joka921
Copy link
Member

joka921 commented Jan 30, 2022

  1. As far as I understand, @WolfgangFahl is using a 10-year old Mac Pro, because its the only machine where he has 64GB available.

    1. Qlever's Index Building is often CPU-Bound, on our 1 year old machines it runs faster than on our 3 year old machines,
      and much faster than on our 10-year old machines.
    2. It might be tough to run natively on MacOs, you need to link againgst libstdc++ and also need a boost::program_options which is built against libstdc++. This is hard on Mac, where the default is a version of libc++ that also supports even less features than the LLVM libc++. Maybe we should discuss, if we should make QLever more compatible, but our current policy (which I am responsible for is "QLever builds on Ubuntu 18 or newer, you can always use docker")
    3. I am not sure, how the Docker implementation on MacOS is. If it's implemented using Virtualization (like on Windows),
      the overhead might be significantly higher than on a Linux machine, where Docker uses the same kernel than the host.
2022-01-30 13:30:03.446	- INFO:  Processing input triples from /dev/stdin ...
2022-01-30 15:28:29.931	- INFO:  Input triples processed: 100,000,000     

This is not "log output not showing", QLever indeed takes two hours before it actually starts doing something.
In some circumstances (especially for small knowledge bases) there is a really long wait between these steps,
which I'll have to look into. So this might either be an extreme occurence of a known issue, or something new.

  1. If you have a Budget for buying hardware, I think a machine with a newer CPU AND quite some RAM might benefit your
    experiments with large RDF datasets (Wikidata and larger). This doesn't only hold for QLever, but also for e.g. Virtuoso (and most other engines are rather slow, no matter what you do).

@hannahbast
Copy link
Member

Thanks, @joka921, for chiming in. The very long wait until something happens never happened to me so far. I am curious what that will turn out to be. (I did experience some wait, but never very long.)

Concerning budget: You get an AMD Ryzen 9 5900X machine for around 1.000 €, so not that expensive. And then a few more €€€ for disk space, depending on how much you want. We have machines with 1,7 TB SSD (cheap) and with a 33 TB HD raid (1.500 € extra).

@WolfgangFahl
Copy link
Author

The budget discussion needs to be a postponed for a few day but i am at it.
For the time being my two 64 GB machines will have to do and i'll have to be patient.
I'll report the state of affairs in the other ticket.

@hannahbast
Copy link
Member

A lot has happened with the Dockerfile and binary builds in the meantime. If you still have problems building an index, please open a new issue or reopen this one.

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

3 participants