Commits

Michał Odnous  committed 2b1ea9d

Spinning up evaluator instances.

  • Participants
  • Parent commits dab1b06
  • Branches bootstrapping-ubuntu

Comments (0)

Files changed (1)

File scripts/install_and_run_PyHO.sh

 #!/bin/bash
+set -e
 
 INSTANCES=${INSTANCES:-4}  # How many instances to run.
 BRANCH=${BRANCH:-bootstrapping-ubuntu}
 COUNT=10
 echo -e "\nRunning installation in ${COUNT} seconds. Press Ctrl+C to stop."
 
-# while [[ $COUNT > 0 ]]; do
-#     echo -n "${COUNT} "
-#     sleep 1
-#     let COUNT=COUNT-1
-# done
+while [[ $COUNT > 0 ]]; do
+    echo -n "${COUNT} "
+    sleep 1
+    let COUNT=COUNT-1
+done
 echo -e "\n"
 
 
 wget "${URL}" -O "${ZIP_OUTPUT}"
 
 echo -e "Unpacking sources...\n"
-TARGET="PyHO"
+TARGET="PyHO-installation"
 unzip -q -o "${ZIP_OUTPUT}" -d "${TARGET}"
 
 # Navigate to ZIP's top-level dir.
 # Install requirements and PyHO
 ./scripts/ubuntu_dependencies.sh
 
+
+echo -e "\n\nRunning evaluator instances...\n"
+COMMAND="./run_bc_evaluator \
+    -coil ./examples/fmdt/assets/example_coil.param \
+    -grid ./examples/fmdt/assets/example.grid \
+    -fine 7"
+
+for i in `seq 1 $INSTANCES`; do
+    PULL_PORT="1111$i"
+    PUBLISH_PORT="2222$i"
+    RUN="${COMMAND} -network-pull-port ${PULL_PORT} -network-publish-port ${PUBLISH_PORT}"
+
+    echo "Instance $i, pull port: ${PULL_PORT}, publish port: ${PUBLISH_PORT}."
+
+    ${RUN} 1>/dev/null &  # Run in background
+    PID="$!"
+    echo -e "\tStarted process with PID: ${PID}"
+done