You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
662 B
25 lines
662 B
#!/bin/bash |
|
|
|
# Wrapper script that cleans data directories with sudo before running benchmark |
|
# Use this if you encounter permission errors with run-benchmark.sh |
|
|
|
set -e |
|
|
|
cd "$(dirname "$0")" |
|
|
|
# Stop any running containers first |
|
echo "Stopping any running benchmark containers..." |
|
if docker compose version &> /dev/null 2>&1; then |
|
docker compose down -v 2>&1 | grep -v "warning" || true |
|
else |
|
docker-compose down -v 2>&1 | grep -v "warning" || true |
|
fi |
|
|
|
# Clean data directories with sudo |
|
if [ -d "data" ]; then |
|
echo "Cleaning data directories (requires sudo)..." |
|
sudo rm -rf data/ |
|
fi |
|
|
|
# Now run the normal benchmark script |
|
exec ./run-benchmark.sh
|
|
|