-
Notifications
You must be signed in to change notification settings - Fork 107
Fix version of qlever script and improve Docker image help message
#2605
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
Open
hannahbast
wants to merge
2
commits into
master
Choose a base branch
from
docker-image-with-qlever-cli-in-sync
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8
−14
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,25 +14,19 @@ | |
|
|
||
| # Help message that is printed if the container is not startes as recommended. | ||
| HELP_MESSAGE=' | ||
| The recommended way to run a container with this image is as follows. Run in a fresh directory. Add `-p <outside port>:<inside port>` if you want to expose ports. Inside the container, the `qlever` command-line tool is available, as well as the QLever binaries (which you need not call directly, they are called by the various `qlever` commands). | ||
| The recommended way to use this image is with the `qlever` command-line tool, which can be installed with `pip install qlever`, `pipx install qlever`, or `uv tool install qlever`. Commands like `qlever index` or `qlever start` use the QLever Docker image by default (and will pull the right image if necessary). | ||
|
|
||
| In batch mode (user `qlever` inside the container, with the same UID and GID as outside): | ||
| Alternatively, the `qlever` command-line tool is also available inside of the container. For example, you can run (with user `qlever` inside the container, with the same UID and GID as the calling user): | ||
|
|
||
| \x1b[34mdocker 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"\x1b[0m | ||
| \x1b[34mdocker run -it --rm -e UID=$(id -u) -e GID=$(id -g) -v $(pwd):/data -w /data adfreiburg/qlever -c "qlever setup-config olympics && qlever get-data && qlever index"\x1b[0m | ||
|
|
||
| The same, but in interactive mode: | ||
| The same, but opening an interactive shell inside of the container: | ||
|
|
||
| \x1b[34mdocker run -it --rm -e UID=$(id -u) -e GID=$(id -g) -v $(pwd):/data -w /data qlever\x1b[0m | ||
| \x1b[34mdocker run -it --rm -e UID=$(id -u) -e GID=$(id -g) -v $(pwd):/data -w /data adfreiburg/qlever\x1b[0m | ||
|
|
||
| It also works with `-u $(id -u):$(id -g)` (but then the user inside the container has no proper name): | ||
| If you do not care about the user inside of the container, you can also use `-u $(id -u):$(id -g)` instead of `-e UID=... -e GID=...` (then the user inside of the container has no proper name) or omit this part (then the user inside of the container is `root`). | ||
|
|
||
| \x1b[34mdocker run -it --rm -u $(id -u):$(id -g) -v $(pwd):/data -w /data qlever\x1b[0m | ||
| \x1b[34mdocker run -it --rm -u $(id -u):$(id -g) -v $(pwd):/data -w /data qlever -c "..."\x1b[0m | ||
|
|
||
| With podman you should use `-u $(id -u):$(id -g)` together with `--userns=keep-id`: | ||
|
|
||
| \x1b[34mpodman run -it --rm -u $(id -u):$(id -g) --userns=keep-id -v $(pwd):/data -w /data qlever\x1b[0m | ||
| \x1b[34mpodman run -it --rm -u $(id -u):$(id -g) --userns=keep-id -v $(pwd):/data -w /data qlever -c "..."\x1b[0m | ||
| With podman you should use `-u $(id -u):$(id -g)` together with `--userns=keep-id`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's nice that this is documented, but why does it matter to me as a regular user if my user is root, some number or my username? |
||
| ' | ||
|
|
||
| # If the container is run without `-v ...:/data -w /data` (in particular, without | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some users it might be confusing that if a
qlever:latestimage already exists locally (regardless of age) no new image is pulled and they have to pull it manually if they want a more up-to-date version.