Ensure each container gets correct config file
This commit is contained in:
parent
c945f72cac
commit
dc42213aec
|
@ -6,10 +6,12 @@ exp_num="$1"
|
||||||
secrecy="$2"
|
secrecy="$2"
|
||||||
harshness="$3"
|
harshness="$3"
|
||||||
prob="$4"
|
prob="$4"
|
||||||
|
uuid="$5"
|
||||||
|
|
||||||
f1="configs/troll_patrol_config.json"
|
mkdir -p "configs/${uuid}"
|
||||||
|
f1="configs/${uuid}/troll_patrol_config.json"
|
||||||
cp "${f1}.template" "${f1}"
|
cp "${f1}.template" "${f1}"
|
||||||
f2="configs/simulation_config.json"
|
f2="configs/${uuid}/simulation_config.json"
|
||||||
cp "${f2}.template" "${f2}"
|
cp "${f2}.template" "${f2}"
|
||||||
|
|
||||||
# Troll Patrol config
|
# Troll Patrol config
|
||||||
|
|
|
@ -9,9 +9,9 @@ container=$(docker run --rm -d -i $img)
|
||||||
# Create results directory if it doesn't already exist
|
# Create results directory if it doesn't already exist
|
||||||
mkdir -p results/${exp_num}
|
mkdir -p results/${exp_num}
|
||||||
|
|
||||||
docker cp configs/troll_patrol_config.json $container:/home/user/troll-patrol/
|
docker cp configs/${uuid}/troll_patrol_config.json $container:/home/user/troll-patrol/
|
||||||
cat configs/troll_patrol_config.json >> "results/${exp_num}/${uuid}"-troll_patrol_config.json
|
cat configs/troll_patrol_config.json >> "results/${exp_num}/${uuid}"-troll_patrol_config.json
|
||||||
docker cp configs/simulation_config.json $container:/home/user/simulation/
|
docker cp configs/${uuid}/simulation_config.json $container:/home/user/simulation/
|
||||||
cat configs/simulation_config.json >> "results/${exp_num}/${uuid}"-simulation_config.json
|
cat configs/simulation_config.json >> "results/${exp_num}/${uuid}"-simulation_config.json
|
||||||
|
|
||||||
# Run rdsys to give bridges to LA
|
# Run rdsys to give bridges to LA
|
||||||
|
|
|
@ -26,7 +26,7 @@ run_docker() {
|
||||||
# Get a UUID so each simulation run stores its output in a different file
|
# Get a UUID so each simulation run stores its output in a different file
|
||||||
uuid=$(cat /proc/sys/kernel/random/uuid)
|
uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||||
|
|
||||||
./scripts/gen-configs.sh $1 $2 $3 $4
|
./scripts/gen-configs.sh $1 $2 $3 $4 $uuid
|
||||||
./scripts/run-container.sh $1 $uuid
|
./scripts/run-container.sh $1 $uuid
|
||||||
|
|
||||||
# If harshness = 2, probability of users submitting reports=0.25,
|
# If harshness = 2, probability of users submitting reports=0.25,
|
||||||
|
|
Loading…
Reference in New Issue