Recommend using pre-built Docker image (#614)

* Recommend using pre-built Docker image

* Update README.md

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
This commit is contained in:
Quentin Pradet 2023-10-03 21:40:24 +04:00 committed by GitHub
parent 352e31ed14
commit 3be610b6fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 20 deletions

View File

@ -79,24 +79,19 @@ specifying different package names.
### Docker ### Docker
Users wishing to use Eland without installing it, in order to just run the available scripts, can build the Docker If you want to use Eland without installing it just to run the available scripts, use the Docker
container: image.
It can be used interactively:
```bash ```bash
$ docker build -t elastic/eland . $ docker run -it --rm --network host docker.elastic.co/eland/eland
```
The container can now be used interactively:
```bash
$ docker run -it --rm --network host elastic/eland
``` ```
Running installed scripts is also possible without an interactive shell, e.g.: Running installed scripts is also possible without an interactive shell, e.g.:
```bash ```bash
$ docker run -it --rm --network host \ $ docker run -it --rm --network host \
elastic/eland \ docker.elastic.co/eland/eland \
eland_import_hub_model \ eland_import_hub_model \
--url http://host.docker.internal:9200/ \ --url http://host.docker.internal:9200/ \
--hub-model-id elastic/distilbert-base-cased-finetuned-conll03-english \ --hub-model-id elastic/distilbert-base-cased-finetuned-conll03-english \

View File

@ -68,22 +68,18 @@ $ eland_import_hub_model <authentication> \ <1>
IMPORTANT: To use the Docker container, you need to clone the Eland repository: https://github.com/elastic/eland IMPORTANT: To use the Docker container, you need to clone the Eland repository: https://github.com/elastic/eland
If you want to use Eland without installing it, you can build the Docker container to run the available scripts: If you want to use Eland without installing it, you can use the Docker image:
You can use the container interactively:
```bash ```bash
$ docker build -t elastic/eland . $ docker run -it --rm --network host docker.elastic.co/eland/eland
```
You can now use the container interactively:
```bash
$ docker run -it --rm --network host elastic/eland
``` ```
Running installed scripts is also possible without an interactive shell, for example: Running installed scripts is also possible without an interactive shell, for example:
```bash ```bash
docker run -it --rm elastic/eland \ docker run -it --rm docker.elastic.co/eland/eland \
eland_import_hub_model \ eland_import_hub_model \
--url $ELASTICSEARCH_URL \ --url $ELASTICSEARCH_URL \
--hub-model-id elastic/distilbert-base-uncased-finetuned-conll03-english \ --hub-model-id elastic/distilbert-base-uncased-finetuned-conll03-english \
@ -138,7 +134,7 @@ the model directory, so the container can read the files:
[source,bash] [source,bash]
---- ----
docker run --mount type=bind,source=/PATH/TO/MODELS,destination=/models,readonly -it --rm elastic/eland \ docker run --mount type=bind,source=/PATH/TO/MODELS,destination=/models,readonly -it --rm docker.elastic.co/eland/eland \
eland_import_hub_model \ eland_import_hub_model \
--url 'XXXX' \ --url 'XXXX' \
--hub-model-id /models/bert-base-NER \ --hub-model-id /models/bert-base-NER \