Skip to content

Commit

Permalink
review container doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Aug 17, 2021
1 parent b11f9d0 commit d134e1f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions doc/Grobid-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ The process for retrieving and running the image is as follow:
- Run the container:

```bash
> docker run -t --rm --init lfoppiano/grobid:${latest_grobid_version}
> docker run -t --rm --init -p 8070:8070 lfoppiano/grobid:${latest_grobid_version}
```

Latest verion:

```bash
> docker run -t --rm --init -p 8070:8070 lfoppiano/grobid:0.7.0
```

Note the default version is running on port `8070`, however it can be mapped on the more traditional port `8080` of your host with the following command:
Expand Down Expand Up @@ -57,23 +63,23 @@ Current latest version:
- Run the container:

```bash
> docker run --rm --gpus all --init grobid/grobid:${latest_grobid_version}
> docker run --rm --gpus all --init -p 8070:8070 grobid/grobid:${latest_grobid_version}
```

The image will automatically uses the GPU and CUDA version available on your host machine, but only on Linux. GPU usage via a container on Windows and MacOS machine is currently not supported by Docker. If no GPU are available, CPU will be used.

To specify to use only certain GPUs (see the [nvidia container toolkit user guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/user-guide.html#gpu-enumeration) for more details):

```bash
> docker run --rm --gpus '"device=1,2"' --init -p 8080:8070 -p 8081:8071 grobid/grobid:${latest_grobid_version}
> docker run --rm --gpus '"device=1,2"' --init -p 8070:8070 -p 8081:8071 grobid/grobid:${latest_grobid_version}
```

You can run the image on CPU by omitting the `-gpus` parameters.

Note the default version is running on port `8070`, however it can be mapped on the more traditional port `8080` of your host with the following command:

```bash
> docker run -t --rm --gpus all --init -p 8080:8070 -p 8081:8071 grobid/grobid:${latest_grobid_version}
> docker run -t --rm --gpus all --init -p 8080:8070 grobid/grobid:${latest_grobid_version}
```

Access the service:
Expand Down

0 comments on commit d134e1f

Please sign in to comment.