Forráskód Böngészése

Build scripts for the non-docker experiments

Ian Goldberg 3 hónapja
szülő
commit
ad8a455038
3 módosított fájl, 90 hozzáadás és 0 törlés
  1. 33 0
      repro/build-fig9-livenet
  2. 40 0
      repro/clone-fig9-livenet
  3. 17 0
      repro/setup-fig9-livenet

+ 33 - 0
repro/build-fig9-livenet

@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Build the PRAC, 3P-Circuit-ORAM, and Ramen code on the host, not in a
+# docker.  Basically run the contents of their respective Dockerfiles.
+
+# Does not assume it's running as root.  Be sure to run
+# ./setup-fig9-livenet as root first, though.  Run this on the three
+# machines that will run the three multiparty computation parties.
+
+# cd into the directory containing this script (from the bash faq 028)
+if [[ $BASH_SOURCE = */* ]]; then
+  cd -- "${BASH_SOURCE%/*}/" || exit
+fi
+
+# Clone the repos
+./clone-fig9-livenet
+
+echo "Building PRAC..."
+echo
+( cd .. && make -j`nproc` ) || exit 1
+
+echo
+echo "Building Circuit ORAM..."
+echo
+( cd comps/circuit-oram && ant ) || exit 1
+
+echo
+echo "Building Ramen..."
+echo
+( cd comps/ramen && cargo build --release --example=bench_doram ) || exit 1
+
+echo
+echo "Done."

+ 40 - 0
repro/clone-fig9-livenet

@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Clone the PRAC, 3P-Circuit-ORAM, and Ramen code on the host, not in a
+# docker.  Run this on the local control machine to get the scripts to
+# run the Figure 9 experiments, or on the MPC machines to get the code
+# to build and run.
+
+# Does not assume it's running as root.  Be sure to have git installed.
+
+# cd into the directory containing this script (from the bash faq 028)
+if [[ $BASH_SOURCE = */* ]]; then
+  cd -- "${BASH_SOURCE%/*}/" || exit
+fi
+
+mkdir -p comps
+
+# Clone the given repo or update it
+# Args: repo_url dirname branch_or_tag
+clone_or_update() {
+    repourl="$1"
+    repodir="$2"
+    tag="$3"
+    if [ -d comps/${repodir}/.git ]; then
+        ( cd comps/${repodir} && git fetch --tags -f origin && \
+            git checkout $tag && git pull ) || exit 1
+    else
+        ( cd comps && git clone ${repourl} ${repodir} && cd ${repodir} && \
+            git checkout $tag ) || exit 1
+    fi
+}
+
+# See if we need to clone those other two repos
+clone_or_update \
+    https://git-crysp.uwaterloo.ca/avadapal/3p-circuit-oram-prac-repro \
+    circuit-oram master
+
+clone_or_update \
+    https://git-crysp.uwaterloo.ca/avadapal/ramen-dockerization \
+    ramen master
+

+ 17 - 0
repro/setup-fig9-livenet

@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Set up the build environment for the PRAC, 3P-Circuit-ORAM, and Ramen
+# code on the host, not in a docker.
+
+# Run this script as root.
+
+apt update
+
+# PRAC dependencies
+apt install -y wget git build-essential net-tools iproute2 iperf iputils-ping libbsd-dev libboost-all-dev numactl time
+
+# 3P-Circuit-ORAM dependencies
+apt install -y wget git build-essential net-tools iproute2 iperf iputils-ping numactl ant openjdk-11-jre-headless openjdk-11-jdk-headless tcpdump time
+
+# Ramen dependencies
+apt install -y wget git build-essential net-tools iproute2 iperf iputils-ping cargo numactl time m4