Skip to content

Commit c48c8e0

Browse files
authored
CU-8699td0xq: Move to v2 model pack (#47)
* CU-8699td0xq: Move to v2 model pack * CU-8699td0xq: Add back v1 model pack * CU-8699td0xq: Update relevant ignore files * CU-8699td0xq: Add v1-specific example compose file * CU-8699td0xq: Add option to use either v1 or v2-specific compose file when testing examples * CU-8699td0xq: Run both v1 and v2 in integration tests
1 parent b67fdd9 commit c48c8e0

File tree

8 files changed

+27
-7
lines changed

8 files changed

+27
-7
lines changed

.github/workflows/medcat-service_docker.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ jobs:
112112
integration_test:
113113
runs-on: ubuntu-latest
114114
needs: build
115+
strategy:
116+
matrix:
117+
variant: [v1, v2]
115118
steps:
116119
- name: Check out code
117120
uses: actions/checkout@v4
@@ -120,8 +123,8 @@ jobs:
120123
run: |
121124
echo "🧪 Running Examples test..."
122125
export IMAGE_TAG=${{ needs.build.outputs.image_version }} # Improve by running exact digest instead
123-
echo "Running with image tag ${IMAGE_TAG}"
124-
bash scripts/test_examples.sh
126+
echo "Running with image tag ${IMAGE_TAG} and variant ${{ matrix.variant }}"
127+
bash scripts/test_examples.sh ${{ matrix.variant }}
125128
126129
- name: Report test result
127130
if: always()

medcat-service/.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tmp_cat.log
55
# skip the models directory
66
models
77
!models/examples
8-
models/examples/example-medcat-v1-model-pack
8+
models/examples/example-medcat-v[12]-model-pack
99

1010
## Default Python .dockerignore
1111
# Git

medcat-service/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ __pycache__
1212
models/*
1313
!models/*.sh
1414
!models/examples
15-
models/examples/example-medcat-v1-model-pack
15+
models/examples/example-medcat-v[12]-model-pack
1616

1717
# tmp folder
1818
tmp/*
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: cogstack-medcat-service
2+
services:
3+
medcat-service:
4+
image: cogstacksystems/medcat-service:${IMAGE_TAG-latest}
5+
restart: unless-stopped
6+
environment:
7+
# Uses a preloaded model pack example inside the image
8+
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v1-model-pack.zip
9+
ports:
10+
- "5555:5000"

medcat-service/docker/docker-compose.example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ services:
55
restart: unless-stopped
66
environment:
77
# Uses a preloaded model pack example inside the image
8-
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v1-model-pack.zip
8+
- APP_MEDCAT_MODEL_PACK=/cat/models/examples/example-medcat-v2-model-pack.zip
99
ports:
1010
- "5555:5000"

medcat-service/docker/run_example_simple.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/usr/bin/env bash
22

3-
DOCKER_COMPOSE_FILE="docker-compose.example.yml"
3+
DOCKER_COMPOSE_FILE_V1="docker-compose.example.v1.yml"
4+
DOCKER_COMPOSE_FILE_V2="docker-compose.example.yml"
5+
# choose between file based on CLI argument
6+
if [ "$1" = "v1" ]; then
7+
DOCKER_COMPOSE_FILE="$DOCKER_COMPOSE_FILE_V1"
8+
else
9+
DOCKER_COMPOSE_FILE="$DOCKER_COMPOSE_FILE_V2"
10+
fi
411
# To run in a container run "export LOCALHOST_NAME=host.docker.internal"
512
LOCALHOST_NAME=${LOCALHOST_NAME:-localhost}
613

31.9 MB
Binary file not shown.

medcat-service/scripts/test_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010

1111

1212
cd ${SCRIPT_DIR}/../docker
13-
bash run_example_simple.sh
13+
bash run_example_simple.sh $1
1414

1515
# Check if health check was successful
1616
if [ $? -eq 0 ]; then

0 commit comments

Comments
 (0)