From a4ffca48d37ff19364b695d4850fb1c0777bc68a Mon Sep 17 00:00:00 2001 From: Kumar Shivendu Date: Wed, 7 Aug 2024 22:58:32 +0530 Subject: [PATCH] Allow CI to force clear previously running resources if required (#182) * Allow CI to force clear previously running resources if required * Remove running vector-db-benchmark instances --- tools/run_experiment.sh | 5 +++++ tools/run_server_container.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/run_experiment.sh b/tools/run_experiment.sh index 0ee29375..50d92262 100644 --- a/tools/run_experiment.sh +++ b/tools/run_experiment.sh @@ -24,11 +24,15 @@ if [[ -z "$PRIVATE_IP_OF_THE_SERVER" ]]; then exit 1 fi +docker container rm -f ci-benchmark-upload || true +docker container rm -f ci-benchmark-search || true + docker rmi --force qdrant/vector-db-benchmark:latest || true docker run \ --rm \ -it \ + --name ci-benchmark-upload \ -v "$HOME/results:/code/results" \ qdrant/vector-db-benchmark:latest \ python run.py --engines "${ENGINE_NAME}" --datasets "${DATASETS}" --host "${PRIVATE_IP_OF_THE_SERVER}" --no-skip-if-exists --skip-search @@ -36,6 +40,7 @@ docker run \ docker run \ --rm \ -it \ + --name ci-benchmark-search \ -v "$HOME/results:/code/results" \ qdrant/vector-db-benchmark:latest \ python run.py --engines "${ENGINE_NAME}" --datasets "${DATASETS}" --host "${PRIVATE_IP_OF_THE_SERVER}" --no-skip-if-exists --skip-upload diff --git a/tools/run_server_container.sh b/tools/run_server_container.sh index c28e145c..79648605 100644 --- a/tools/run_server_container.sh +++ b/tools/run_server_container.sh @@ -34,7 +34,7 @@ if [[ ${QDRANT_VERSION} == docker/* ]] || [[ ${QDRANT_VERSION} == ghcr/* ]]; the CONTAINER_REGISTRY='ghcr.io' fi - DOCKER_COMPOSE="export QDRANT_VERSION=${QDRANT_VERSION}; export CONTAINER_REGISTRY=${CONTAINER_REGISTRY}; docker compose down; pkill qdrant ; docker rmi ${CONTAINER_REGISTRY}/qdrant/qdrant:${QDRANT_VERSION} || true ; docker compose up -d; docker container ls" + DOCKER_COMPOSE="export QDRANT_VERSION=${QDRANT_VERSION}; export CONTAINER_REGISTRY=${CONTAINER_REGISTRY}; docker compose down; pkill qdrant; docker rm -f qdrant-continuous || true; docker rmi -f ${CONTAINER_REGISTRY}/qdrant/qdrant:${QDRANT_VERSION} || true ; docker compose up -d; docker container ls -a" ssh -t -o ServerAliveInterval=60 -o ServerAliveCountMax=3 "${SERVER_USERNAME}@${IP_OF_THE_SERVER}" "cd ./projects/vector-db-benchmark/engine/servers/${CONTAINER_NAME} ; $DOCKER_COMPOSE" else echo "Error: unknown version ${QDRANT_VERSION}. Version name should start with 'docker/' or 'ghcr/'"