Skip to content

Commit

Permalink
Allow CI to force clear previously running resources if required (#182)
Browse files Browse the repository at this point in the history
* Allow CI to force clear previously running resources if required

* Remove running vector-db-benchmark instances
  • Loading branch information
KShivendu authored Aug 7, 2024
1 parent d14e6e8 commit a4ffca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tools/run_experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ 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

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
2 changes: 1 addition & 1 deletion tools/run_server_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/'"
Expand Down

0 comments on commit a4ffca4

Please sign in to comment.