From 47f834e3659956d7e11bc7b0c8cd52b4d7a25b24 Mon Sep 17 00:00:00 2001 From: tschaffter Date: Wed, 27 Oct 2021 15:46:57 -0700 Subject: [PATCH 1/3] Update how to run tool --- README.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4ab9733..baaf9c1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ a Docker image of this tool to Synapse Docker Registry. This image of this example tool can be submitted as-is on [NLPSandbox.io] to benchmark its performance -- just don't expect a high performance! -## Contents +## Table of contents - [Specification](#Specification) - [Requirements](#Requirements) @@ -59,27 +59,35 @@ performance -- just don't expect a high performance! ## Specification +- Tool version: 1.2.1 - NLP Sandbox schemas version: 1.2.0 -- NLP Sandbox tool version: 1.2.1 - Docker image: [docker.synapse.org/syn22277123/phi-annotator-example] - ## Requirements - [Docker Engine] >=19.03.0 - ## Usage ### Running with Docker -The command below starts this NLP Sandbox PHI annotator locally. +To download the tool image published and run it. + +```console +docker compose pull +docker compose up +``` + +Alternatively, you can build the image and run it. ```console docker compose up --build ``` You can stop the container run with `Ctrl+C`, followed by `docker compose down`. +Add the option `-d` or `--detach` to start the container in detached mode. If +`docker compose` in not available on your system, please install [docker +compose]. ### Running with Python @@ -100,14 +108,8 @@ python -m openapi_server ### Accessing this NLP Sandbox tool User Interface This NLP Sandbox tool provides a web interface that you can use to annotate -clinical notes. This web client has been automatically generated by -[openapi-generator]. To access the UI, open a new tab in your browser and -navigate to one of the following address depending on whether you are running -the tool using Docker (production) or Python (development). - -- Using Docker: http://localhost/ui -- Using Python: http://localhost:8080/ui - +clinical notes. To access the UI, open your browser and navigate to +http://localhost:8080/ui. ## Development @@ -354,3 +356,4 @@ Thinking about contributing to this project? Get started by reading our [Patient schema]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/openapi/commons/components/schemas/Patient.yaml [semantic versioning]: https://semver.org/ [NLP Sandbox schemas CHANGELOG]: .github/CHANGELOG.md +[docker compose]: https://docs.docker.com/compose/install/ From e2730cade39329694b43082388cdd17b57f301fd Mon Sep 17 00:00:00 2001 From: tschaffter Date: Wed, 27 Oct 2021 15:51:34 -0700 Subject: [PATCH 2/3] Add npm ci to readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index baaf9c1..fde08d7 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ performance -- just don't expect a high performance! - [Enabling version updates](#Enabling-version-updates) - [Generating a new NLP Sandbox tool using openapi-generator](#Generating-a-new-NLP-Sandbox-tool-using-openapi-generator) + - [Install Node.js dependencies](#Install-Node.js-dependencies) - [Keeping your tool up-to-date](#Keeping-your-tool-up-to-date) - [Testing](#Testing) - [Preventing an NLP Sandbox tool from connecting to remote @@ -209,6 +210,14 @@ The URL is composed of different elements: can be replaced by a specific release version `x.y.z` of the [NLP Sandbox schemas]. +### Install Node.js dependencies + +Install the following dependencies to run `npm run