-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-build.sh
More file actions
executable file
·35 lines (27 loc) · 1.15 KB
/
docker-build.sh
File metadata and controls
executable file
·35 lines (27 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Script to build the unsafe Rust benchmark Docker image
set -e
echo "Building unsafe Rust benchmark Docker image..."
echo "WARNING: This build will take 1-2 hours or more depending on your system."
echo "The build process includes:"
echo " 0. Configuration check"
echo " 1. Installing system dependencies"
echo " 2. Copying repository files into Docker"
echo " 3. Building the custom Rust compiler from source"
echo " 4. Building default instrumentation library (coverage)"
echo ""
# Non-interactive mode
echo "Start building..."
echo ""
echo "Step 1-4: Building Docker image..."
# Build the Docker image
docker build -t unsaferust-bench:local -f Dockerfile . 2>&1 | tee build.log
echo ""
echo "Build complete! To run the container:"
echo " docker run -it unsaferust-bench:local"
echo ""
echo "To run a specific benchmark:"
echo " docker run -it unsaferust-bench:local bash -c 'cd /workspace/benchmarks/arrayvec-0.7.6 && cargo bench'"
echo ""
echo "To run ALL experiments automatically:"
echo " docker run --rm -v \$(pwd)/run_all_docker_tests.sh:/workspace/run_all_docker_tests.sh unsaferust-bench:local bash /workspace/run_all_docker_tests.sh"