-
Notifications
You must be signed in to change notification settings - Fork 2
/
auto_setup.sh
executable file
·51 lines (37 loc) · 1.66 KB
/
auto_setup.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -e
# AUTOMATIC SETUP SCRIPT
# This script will download Apache Flink into this directory, then download
# the input data for the experiment, compile the application and eventually
# run two iterations of the Linear Road experiment.
. reproduce/shared_vars.sh
echo "Automatic setup about to start"
countdown 5 "to start."
# 1. Download Apache Flink
HOMEDIR="$(pwd)/flink-1.10.0"
echo "Downloading Apache Flink..."
wget https://archive.apache.org/dist/flink/flink-1.10.0/flink-1.10.0-bin-scala_2.11.tgz
echo "Unpacking Apache Flink..."
tar zxvf flink-1.10.0-bin-scala_2.11.tgz
rm flink-1.10.0-bin-scala_2.11.tgz
echo "Done."
# 2. Download the required datasets
echo "Downloading datasets..."
bash standalone_input_data_downloader.sh
# 3. Set up the configuration file and compile application
echo "Updating config file..."
sed -i "s|PATH_HERE|$HOMEDIR|g" scripts/config.sh
echo "Compiling Ananke..."
./scripts/compile.sh
# 4. Set up plotting requirements
echo "Setting up plotting requirements..."
pip3 install -r python-requirements.txt
# 5. Run a short experiment
echo "---------------------------------------"
echo "Running a short demonstrator experiment in"
countdown 5
EXPERIMENT_NAME="setup_exp"
OUTPUT_DATA_FOLDER="${COMMIT_HASH}"_"${EXPERIMENT_NAME}"
./scripts/run.sh ./scripts/experiments/setup_exp.sh -d 1 -r 1 -c "${EXPERIMENT_NAME}"
python3 "${PLOT_SCRIPT}" --path "${OUTPUT_PATH}" --experiment "${OUTPUT_DATA_FOLDER}" --name carcloud --plot soa
echo "If you read \"[YYYY-MM-DD HH:MM:SS] Experiment OK!\" in the output above, and a figure was created and saved to disk then the setup was now succesful (the content of the figure is just a placeholder)."