-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Generate codebase from spec 0.1.6 * Complete docker-compose requirements to deploy the stack * The server can now deidentify clinical notes!! * Update CI/CD
- Loading branch information
1 parent
1fffffe
commit 4c3faed
Showing
18 changed files
with
395 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
# NLP Sandbox Deidentifier | ||
|
||
<!-- [![GitHub Stars](https://img.shields.io/github/stars/Sage-Bionetworks/nlp-sandbox-deidentifier.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/nlp-sandbox-deidentifier) --> | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/nlpsandbox/deidentifier-shiny-app.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/Sage-Bionetworks/deidentifier-shiny-app) | ||
[![GitHub CI](https://img.shields.io/github/workflow/status/Sage-Bionetworks/nlp-sandbox-deidentifier/ci.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/nlp-sandbox-deidentifier) | ||
[![GitHub Release](https://img.shields.io/github/release/Sage-Bionetworks/nlp-sandbox-deidentifier.svg?include_prereleases&color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/nlp-sandbox-deidentifier/releases) | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/nlpsandbox/date-annotator-example.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/nlpsandbox/date-annotator-example) | ||
[![GitHub License](https://img.shields.io/github/license/Sage-Bionetworks/nlp-sandbox-deidentifier.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/nlp-sandbox-deidentifier) | ||
|
||
NLP Sandbox de-identification client and server | ||
|
||
## Specification | ||
## Specification | ||
|
||
TBA | ||
|
||
## Usage | ||
|
||
The command below starts the Deidentifier stack locally. | ||
|
||
docker-compose up | ||
|
||
When running, the Deidentifier stacks provides a web interface (http://localhost:3838) | ||
that you can use to deidentify single or multiple clinical notes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,45 @@ | ||
FROM python:3-alpine | ||
FROM python:3.8.5-slim-buster | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
ARG S6_VERSION | ||
ENV S6_VERSION=${S6_VERSION:-v2.1.0.0} | ||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 | ||
ENV PIP_NO_CACHE_DIR=off | ||
ENV APP_USER=app | ||
ENV APP_DIR=/opt/app | ||
|
||
COPY requirements.txt /usr/src/app/ | ||
# Safer bash scripts with 'set -euxo pipefail' | ||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"] | ||
|
||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
# Install dependencies | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update -qq -y \ | ||
&& apt-get install --no-install-recommends -qq -y \ | ||
curl \ | ||
unzip \ | ||
&& apt-get -y autoclean \ | ||
&& apt-get -y autoremove \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /usr/src/app | ||
# Set up S6 init system | ||
RUN curl -fsSL https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz \ | ||
-o /tmp/s6-overlay.tar.gz \ | ||
&& tar xzf /tmp/s6-overlay.tar.gz --directory / \ | ||
&& rm -fr /tmp/s6-overlay.tar.gz | ||
|
||
EXPOSE 8080 | ||
# Add app user | ||
RUN useradd -m -s /bin/bash ${APP_USER} \ | ||
&& echo "${APP_USER}:${APP_USER}" | chpasswd | ||
|
||
# Copy server files | ||
COPY . ${APP_DIR} | ||
RUN chown -R ${APP_USER}:${APP_USER} ${APP_DIR} | ||
|
||
# Install dependencies | ||
RUN pip install -r ${APP_DIR}/requirements.txt | ||
|
||
ENTRYPOINT ["python3"] | ||
# Add s6 scripts | ||
COPY root / | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["-m", "openapi_server"] | ||
ENTRYPOINT ["/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import connexion | ||
import six | ||
from flask import jsonify | ||
|
||
from openapi_server.models.error import Error # noqa: E501 | ||
from openapi_server.models.health import Health # noqa: E501 | ||
from openapi_server import util | ||
|
||
|
||
def health(): # noqa: E501 | ||
"""Get Health | ||
Get the health of the API # noqa: E501 | ||
:rtype: Health | ||
""" | ||
return 'do some magic!' | ||
# return jsonify(Health("pass")) | ||
return jsonify({'status': 'pass'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.