Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/medcat-service_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
integration_test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
variant: [v1, v2]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -120,8 +123,8 @@ jobs:
run: |
echo "🧪 Running Examples test..."
export IMAGE_TAG=${{ needs.build.outputs.image_version }} # Improve by running exact digest instead
echo "Running with image tag ${IMAGE_TAG}"
bash scripts/test_examples.sh
echo "Running with image tag ${IMAGE_TAG} and variant ${{ matrix.variant }}"
bash scripts/test_examples.sh ${{ matrix.variant }}

- name: Report test result
if: always()
Expand Down
2 changes: 1 addition & 1 deletion medcat-service/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tmp_cat.log
# skip the models directory
models
!models/examples
models/examples/example-medcat-v1-model-pack
models/examples/example-medcat-v[12]-model-pack

## Default Python .dockerignore
# Git
Expand Down
2 changes: 1 addition & 1 deletion medcat-service/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ __pycache__
models/*
!models/*.sh
!models/examples
models/examples/example-medcat-v1-model-pack
models/examples/example-medcat-v[12]-model-pack

# tmp folder
tmp/*
Expand Down
10 changes: 10 additions & 0 deletions medcat-service/docker/docker-compose.example.v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: cogstack-medcat-service
services:
medcat-service:
image: cogstacksystems/medcat-service:${IMAGE_TAG-latest}
restart: unless-stopped
environment:
# Uses a preloaded model pack example inside the image
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v1-model-pack.zip
ports:
- "5555:5000"
2 changes: 1 addition & 1 deletion medcat-service/docker/docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ services:
restart: unless-stopped
environment:
# Uses a preloaded model pack example inside the image
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v1-model-pack.zip
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v2-model-pack.zip
ports:
- "5555:5000"
9 changes: 8 additions & 1 deletion medcat-service/docker/run_example_simple.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/env bash

DOCKER_COMPOSE_FILE="docker-compose.example.yml"
DOCKER_COMPOSE_FILE_V1="docker-compose.example.v1.yml"
DOCKER_COMPOSE_FILE_V2="docker-compose.example.yml"
# choose between file based on CLI argument
if [ "$1" = "v1" ]; then
DOCKER_COMPOSE_FILE="$DOCKER_COMPOSE_FILE_V1"
else
DOCKER_COMPOSE_FILE="$DOCKER_COMPOSE_FILE_V2"
fi
# To run in a container run "export LOCALHOST_NAME=host.docker.internal"
LOCALHOST_NAME=${LOCALHOST_NAME:-localhost}

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion medcat-service/scripts/test_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"


cd ${SCRIPT_DIR}/../docker
bash run_example_simple.sh
bash run_example_simple.sh $1

# Check if health check was successful
if [ $? -eq 0 ]; then
Expand Down
Loading