diff --git a/inception_ahd_recommender/Dockerfile b/inception_ahd_recommender/Dockerfile index 5e6e396..91814c4 100644 --- a/inception_ahd_recommender/Dockerfile +++ b/inception_ahd_recommender/Dockerfile @@ -3,18 +3,12 @@ FROM $ROOT_CONTAINER ARG RECOMMENDER_WORKDIR=/inception_ahd_recommender -ARG RECOMMENDER_WORKERS -ARG RECOMMENDER_ADDRESS - WORKDIR $RECOMMENDER_WORKDIR - COPY . . RUN python -m pip install --upgrade pip -RUN python -m pip install gunicorn -RUN python -m pip install -e . -RUN python -m pip install -e ".[contrib]" - +RUN python -m pip install -e . &&\ + python -m pip install -e ".[contrib]" -CMD gunicorn -w $RECOMMENDER_WORKERS -b $RECOMMENDER_ADDRESS --log-level INFO main:app \ No newline at end of file +ENTRYPOINT ["gunicorn"] \ No newline at end of file diff --git a/inception_ahd_recommender/README.md b/inception_ahd_recommender/README.md index bf9c016..4342233 100644 --- a/inception_ahd_recommender/README.md +++ b/inception_ahd_recommender/README.md @@ -151,4 +151,16 @@ Der Recommender `docker` Container (wenn das `RECOMMENDER_WORKDIR` in der `docke * `deid_mapping_singlelayer.json` * `deid_mapping_multilayer.json` -Eine von denen kann dann auch mit ````=`/inception_ahd_recommender/prefab-mapping-files/` referenziert werden. \ No newline at end of file +Eine von denen kann dann auch mit ````=`/inception_ahd_recommender/prefab-mapping-files/` referenziert werden. + +## Entwicklung +### Versionsupdate +Wenn eine neue Version des Recommenders veröffentlicht werden soll, muss die Datei `VERSION` geändert werden +(dadurch wird der entsprechende workflow getriggert, sobald die Veränderung auf den `main` branch kommt → siehe `.github/workflows/ci.yaml`). +Bitte beachten, dass dann auch das version tag Suffix in der `docker-compose.yml` angepasst wird: +``` +services: + ahd-deid-recommender: + image: ghcr.io/medizininformatik-initiative/gemtex/inception-ahd-recommender:1.1.2 + [...] +``` \ No newline at end of file diff --git a/inception_ahd_recommender/VERSION b/inception_ahd_recommender/VERSION index 8cfbc90..8428158 100644 --- a/inception_ahd_recommender/VERSION +++ b/inception_ahd_recommender/VERSION @@ -1 +1 @@ -1.1.1 \ No newline at end of file +1.1.2 \ No newline at end of file diff --git a/inception_ahd_recommender/docker-compose.yml b/inception_ahd_recommender/docker-compose.yml index 77c34af..228338a 100644 --- a/inception_ahd_recommender/docker-compose.yml +++ b/inception_ahd_recommender/docker-compose.yml @@ -1,8 +1,6 @@ services: ahd-deid-recommender: - build: - context: . - image: ahd-deid-recommender:1.1.1 + image: ghcr.io/medizininformatik-initiative/gemtex/inception-ahd-recommender:1.1.2 restart: unless-stopped environment: - EXTERNAL_SERVER_ADDRESS=http://198.168.10.2:8080 @@ -15,7 +13,7 @@ services: - RECOMMENDER_WORKERS=4 - RECOMMENDER_ADDRESS=:5000 ports: - - 5000:5000 + - "5000:5000" networks: - recommender-network networks: diff --git a/inception_ahd_recommender/gunicorn.conf.py b/inception_ahd_recommender/gunicorn.conf.py new file mode 100644 index 0000000..074c4c0 --- /dev/null +++ b/inception_ahd_recommender/gunicorn.conf.py @@ -0,0 +1,6 @@ +import os + +workers = os.environ.get("RECOMMENDER_WORKERS", "2") +bind = os.environ.get("RECOMMENDER_ADDRESS", ":5000") +log_level = 'info' +wsgi_app = "main:app" \ No newline at end of file