diff --git a/README.md b/README.md index 4ab9733..bf6db0b 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) @@ -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 the development dependencies](#Install-the-development-dependencies) - [Keeping your tool up-to-date](#Keeping-your-tool-up-to-date) - [Testing](#Testing) - [Preventing an NLP Sandbox tool from connecting to remote @@ -59,27 +60,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 @@ -93,21 +102,16 @@ conda activate phi-annotator Install and start this NLP Sandbox PHI annotator. ```console -cd server && pip install -r requirements.txt +cd server +pip install -r requirements.txt 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 @@ -207,6 +211,21 @@ The URL is composed of different elements: can be replaced by a specific release version `x.y.z` of the [NLP Sandbox schemas]. +### Install the development dependencies + +Install the Node.js dependencies required to run `npm run