Skip to content

Commit

Permalink
Update docker.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoll-umn authored Oct 31, 2023
1 parent 2a0ea3a commit 5e2941c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Done deploying all servers.

Once the image has started and finished deploying the servers, make a directory called ``in`` in the original directory you created and place any documents you wish to process in that directory.

```bash
mkdir in
```

The following command will process those documents on the image:

```bash
Expand Down Expand Up @@ -103,7 +107,7 @@ docker rm --force b9
Now to start up BioMedICUS using the modified deployment configuration run the following command:

```bash
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 nlpieumn/biomedicus:latest --config biomedicus_deploy_config.yml
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 ghcr.io/nlpie/biomedicus:latest --config biomedicus_deploy_config.yml
```

After the services finish launching you can process documents using the modified pipeline configuration with the following command:
Expand All @@ -117,13 +121,18 @@ docker exec -it b9 b9client run --config biomedicus_default_pipeline.yml --inclu
From the previous section you may have noticed that you can modify the deployment command by appending arguments to the ``docker run`` command. Using this method it is also possible to enable RTF processing:

```bash
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 nlpieumn/biomedicus:latest --rtf
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 ghcr.io/nlpie/biomedicus:latest --rtf
```

Running the RTF-to-text pipeline:
```bash
docker exec -it b9 b9client run-rtf-to-text in out
```

Or even RTF processing with a custom deployment configuration:

```bash
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 nlpieumn/biomedicus:latest --rtf --config biomedicus_deploy_config.yml
docker run -it -d -v $(pwd):/b9/ -w /b9/ --name b9 ghcr.io/nlpie/biomedicus:latest --rtf --config biomedicus_deploy_config.yml
```

To process rtf add the rtf flag to the ``docker exec`` command to run the pipeline:
Expand All @@ -143,7 +152,7 @@ docker export b9 | gzip > biomedicus-latest.tgz
And then after transferring it to the server which has restricted internet access you can import as an image using the following command:

```bash
zcat biomedicus-latest.tgz | docker import - nlpieumn/biomedicus:latest
zcat biomedicus-latest.tgz | docker import - ghcr.io/nlpie/biomedicus:latest
```

From there, the ``docker run`` command at the start of this guide will work.
Expand Down

0 comments on commit 5e2941c

Please sign in to comment.