diff --git a/test/docker-compose.yml b/test/docker-compose.yml index d96d4d53..c42ed582 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,6 +1,6 @@ services: caikit: - # image: quay.io/opendatahub/caikit:latest + image: quay.io/opendatahub/caikit-tgis-serving:dev build: .. volumes: - ./caikit_config:/caikit/config diff --git a/test/smoke-test.sh b/test/smoke-test.sh index 0557ce1a..acb0d904 100644 --- a/test/smoke-test.sh +++ b/test/smoke-test.sh @@ -10,25 +10,29 @@ function command_required() { fi } -command_required python3 command_required docker-compose command_required git-lfs -if [[ ! -d .venv ]]; then - python -m venv .venv || (echo "Failed to create venv. Quitting." >&2 && exit 1) -fi -source .venv/bin/activate || (echo "Could not source venv. Quitting" >&2 && exit 1) - -pip install git+https://github.com/caikit/caikit-nlp if [[ ! -d flan-t5-small ]]; then git clone https://huggingface.co/google/flan-t5-small fi mkdir -p models/ -../utils/convert.py --model-path flan-t5-small --model-save-path models/flan-t5-small-caikit/ - +docker-compose build + +# use the container's environment to convert the model to caikit format +docker run -it --user root \ + -v $PWD/caikit_config:/caikit/config/ \ + -v $PWD/flan-t5-small:/mnt/flan-t5-small \ + -v $PWD/../utils:/utils \ + -v $PWD/models/:/models quay.io/opendatahub/caikit-tgis-serving:dev \ + /utils/convert.py --model-path /mnt/flan-t5-small --model-save-path /mnt/models/flan-t5-small-caikit0w/ echo "Saved caikit model to ./models/" +if [[ -n $CI ]]; then # Free up some space on CI + rm -rf flan-t5-small +fi + docker-compose up -d max_retries=10