chore: fix benchmarks script

This commit is contained in:
Arthur Meyre
2021-12-13 16:15:32 +01:00
parent ce48a757c6
commit 21eb2ac739
2 changed files with 12 additions and 7 deletions

View File

@@ -194,7 +194,10 @@ docker_publish_measurements: docker_build
@# Poetry is not installed on the benchmark servers
@# Thus, we ran `extract_machine_info.py` script using native python
python script/progress_tracker_utils/extract_machine_info.py
docker run --rm --volume /"$$(pwd)":/src $(DEV_DOCKER_IMG) \
docker run --rm --volume /"$$(pwd)":/src \
--volume $(DEV_CONTAINER_VENV_VOLUME):/home/dev_user/dev_venv \
--volume $(DEV_CONTAINER_CACHE_VOLUME):/home/dev_user/.cache \
$(DEV_DOCKER_IMG) \
/bin/bash ./script/progress_tracker_utils/benchmark_and_publish_findings_in_docker.sh
.PHONY: docs # Build docs

View File

@@ -3,13 +3,15 @@
# Run benchmarks while logging the intermediate results
# Publish findings in the progress tracker
set +e
set -e
# shellcheck disable=SC1091
if ! source /root/dev_venv/bin/activate; then
python3 -m venv /root/dev_venv
# shellcheck disable=SC1091
source /root/dev_venv/bin/activate
DEV_VENV_PATH="/home/dev_user/dev_venv"
# shellcheck disable=SC1090,SC1091
if ! source "${DEV_VENV_PATH}/bin/activate"; then
python3 -m venv "${DEV_VENV_PATH}"
# shellcheck disable=SC1090,SC1091
source "${DEV_VENV_PATH}/bin/activate"
cd /src/ && make setup_env
fi