Browse Source

Tweaks to check for SGX driver

sshsshy 4 months ago
parent
commit
f6c72ae8f6
4 changed files with 106 additions and 54 deletions
  1. 0 1
      SPIR_docker/Dockerfile
  2. 8 3
      build_dockers.sh
  3. 80 38
      plotter/gen_graphs.py
  4. 18 12
      reproduce_results.sh

+ 0 - 1
SPIR_docker/Dockerfile

@@ -20,7 +20,6 @@ RUN apt remove -y --purge --auto-remove cmake
 RUN tar -xf cmake-3.23.1.tar.gz
 RUN cd cmake-3.23.1 && ./bootstrap && make && make install 
 
-
 RUN git clone https://github.com/microsoft/SEAL.git
 RUN cd SEAL && git checkout 3.2.0 && cd native/src && cmake . -DSEAL_USE_CXX17=OFF && make && make install
 RUN git clone https://git-crysp.uwaterloo.ca/piros/SealPIR.git

+ 8 - 3
build_dockers.sh

@@ -3,8 +3,13 @@
 cd SPIR_docker
 docker build -t spir_image . 
 
+if [ -e "/dev/isgx" ]
+then
+  cd ../ZT_docker
+  docker build -t zt_image .
+else
+  echo "Skipping ZeroTrace since the device does not have SGX driver installed."
+fi
+
 cd ../XPIR_docker
 docker build -t xpir_image .
-
-cd ../ZT_docker
-docker build -t zt_image .

+ 80 - 38
plotter/gen_graphs.py

@@ -1,13 +1,16 @@
-#!/usr/bin/python2
+#!/usr/bin/python
 import sys
+import os
 import subprocess
 import numpy as np
 from numpy import genfromtxt
-import matplotlib.pyplot as plt
 import numpy.polynomial.polynomial as poly
-from scipy.optimize import curve_fit
 from operator import add
 import operator
+#import matplotlib as mpl
+#if os.environ.get('DISPLAY','') == '':
+#    mpl.use('Agg')
+import matplotlib.pyplot as plt
 
 def quadratic_function(x, a, b, c):
     return a*x*x + b*x + c
@@ -16,8 +19,16 @@ def linear_function(x, a, b):
     return a*x + b
 
 PLOT_PATHORAM = False
-PLOT_CIRCUITORAM = True
 PLOT_LSIPRM = False
+PLOT_CIRCUITORAM = False
+PLOT_ZEROTRACE = False
+
+if(len(sys.argv)>1):
+  if(int(sys.argv[1])==1):
+    PLOT_ZEROTRACE = True
+
+if(PLOT_ZEROTRACE):
+  PLOT_CIRCUITORAM = True
 
 #List of plot files
 LF_PATHORAM='log_ZTPATHORAM'
@@ -29,6 +40,13 @@ LF_SEALPIR='log_SEALPIR'
 LF_SEALPIR_D1='log_SEALPIR_D1'
 DESC_SIZE=16384
 
+n= 10
+n_stop = 12000
+N = []
+while(n < n_stop):
+  N.append(n)
+  n = int(n * 8 / 5)
+print(N)
 
 plt.rc('font', size=18)          # controls default text sizes
 plt.rc('axes', titlesize=18)     # fontsize of the axes title
@@ -39,7 +57,6 @@ plt.rc('legend', fontsize=14)    # legend fontsize
 plt.rc('figure', titlesize=18)  # fontsize of the figure title
 
 ########################
-N = []
 
 LSIPRM_gtime=[]
 LSIPRM_ptime=[]
@@ -131,7 +148,6 @@ if(PLOT_CIRCUITORAM):
   with open(LF_CIRCUITORAM, 'r') as lfile:
     for line in lfile:
       values=line.split(',')
-      N.append(int(values[0]))
       CircuitORAM_gtime.append(float(values[1]))
       CircuitORAM_gtime_err.append(float(values[2]))
       CircuitORAM_ptime.append(float(values[3]))
@@ -154,17 +170,18 @@ if(PLOT_LSIPRM):
       #LSIPRM_query_size = int(values[7])
       #LSIPRM_response_size = int(values[8])
 
-with open(LF_LSOPRM, 'r') as lfile:
-  for line in lfile:
-    values=line.split(',')
-    LSOPRM_gtime.append(float(values[1]))
-    LSOPRM_gtime_err.append(float(values[2]))
-    LSOPRM_ptime.append(float(values[3]))
-    LSOPRM_ptime_err.append(float(values[4]))
-    LSOPRM_etime.append(float(values[5]))
-    LSOPRM_etime_err.append(float(values[6]))
-    LSOPRM_query_size.append(int(values[7]))
-    LSOPRM_response_size.append(int(values[8]))
+if(PLOT_ZEROTRACE):
+  with open(LF_LSOPRM, 'r') as lfile:
+    for line in lfile:
+      values=line.split(',')
+      LSOPRM_gtime.append(float(values[1]))
+      LSOPRM_gtime_err.append(float(values[2]))
+      LSOPRM_ptime.append(float(values[3]))
+      LSOPRM_ptime_err.append(float(values[4]))
+      LSOPRM_etime.append(float(values[5]))
+      LSOPRM_etime_err.append(float(values[6]))
+      LSOPRM_query_size.append(int(values[7]))
+      LSOPRM_response_size.append(int(values[8]))
 
 #SealPIR logs don't contain N
 with open(LF_SEALPIR, 'r') as lfile:
@@ -279,7 +296,8 @@ if(PLOT_CIRCUITORAM):
   points2 = plt.plot(N, CircuitORAM_ptime, POINT_STYLES[c_ctr+1], label='CircuitORAM', color = str("C")+str(c_ctr+1))
 if(PLOT_LSIPRM):
   points3 = plt.plot(N, LSIPRM_ptime, POINT_STYLES[c_ctr+2], label='Linear Scan (inside PRM)', color = str("C")+str(c_ctr+2))
-points4 = plt.plot(N, LSOPRM_ptime, POINT_STYLES[c_ctr+3], label='Linear Scan (outside PRM)', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_ptime, POINT_STYLES[c_ctr+3], label='Linear Scan (outside PRM)', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_PQ_TIME, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_ptime, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 points7 = plt.plot(N, SealPIR_ptime, POINT_STYLES[c_ctr+6], label='Trivial PIR', color = str("C")+str(c_ctr+6))
@@ -291,7 +309,8 @@ if(PLOT_CIRCUITORAM):
   errbar2 = plt.errorbar(N, CircuitORAM_ptime, CircuitORAM_ptime_err, None, 'r', ls='none', mew=3)
 if(PLOT_LSIPRM):
   errbar3 = plt.errorbar(N, LSIPRM_ptime, LSIPRM_ptime_err, None, 'r', ls='none', mew=3)
-errbar4 = plt.errorbar(N, LSOPRM_ptime, LSOPRM_ptime_err, None, 'r', ls='none', mew=3)
+if(PLOT_ZEROTRACE):
+  errbar4 = plt.errorbar(N, LSOPRM_ptime, LSOPRM_ptime_err, None, 'r', ls='none', mew=3)
 errbar5 = plt.errorbar(N, XPIR_PQ_TIME, XPIR_PQ_STD, None, 'r', ls='none', mew=3)
 errbar6 = plt.errorbar(N, SealPIR_ptime, SealPIR_ptime_err , None, 'r', ls='none', mew=3)
 
@@ -302,7 +321,8 @@ if(PLOT_CIRCUITORAM):
   plt.setp(points2, 'mew', '3.0')
 if(PLOT_LSIPRM):
   plt.setp(points3, 'mew', '3.0')
-plt.setp(points4, 'mew', '3.0')
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 plt.setp(points7, 'mew', '0.0')
@@ -338,7 +358,8 @@ if(PLOT_CIRCUITORAM):
   points2 = plt.plot(N, CircuitORAM_ctime, POINT_STYLES[c_ctr+1], label='CircuitORAM', color = str("C")+str(c_ctr+1))
 if(PLOT_LSIPRM):
   points3 = plt.plot(N, LSIPRM_ctime, POINT_STYLES[c_ctr+2], label='Linear Scan (inside PRM)', color = str("C")+str(c_ctr+2))
-points4 = plt.plot(N, LSOPRM_gtime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_gtime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_QE_TIME, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_gtime, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 
@@ -348,7 +369,8 @@ if(PLOT_CIRCUITORAM):
  errbar2 = plt.errorbar(N, CircuitORAM_ctime, CircuitORAM_ctime_err, None, 'r', ls='none', mew=3)
 if(PLOT_LSIPRM):
   errbar3 = plt.errorbar(N, LSIPRM_ctime, LSIPRM_ctime_err, None, 'r', ls='none', mew=3)
-errbar4 = plt.errorbar(N, LSOPRM_gtime, LSOPRM_gtime_err, None, 'r', ls='none', mew=3)
+if(PLOT_ZEROTRACE):
+  errbar4 = plt.errorbar(N, LSOPRM_gtime, LSOPRM_gtime_err, None, 'r', ls='none', mew=3)
 errbar5 = plt.errorbar(N, XPIR_QE_TIME, XPIR_QE_STD, None, 'r', ls='none', mew=3)
 errbar6 = plt.errorbar(N, SealPIR_gtime, SealPIR_gtime_err , None, 'r', ls='none', mew=3)
 
@@ -358,7 +380,8 @@ if(PLOT_CIRCUITORAM):
   plt.setp(points2, 'mew', '3.0')
 if(PLOT_LSIPRM):
   plt.setp(points3, 'mew', '3.0')
-plt.setp(points4, 'mew', '3.0')
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 #plt.setp(line1, 'linewidth', '2.0')
@@ -394,7 +417,8 @@ if(PLOT_CIRCUITORAM):
   points2 = plt.plot(N, CircuitORAM_ctime, POINT_STYLES[c_ctr+1], label='CircuitORAM', color = str("C")+str(c_ctr+1))
 if(PLOT_LSIPRM):
   points3 = plt.plot(N, LSIPRM_ctime, POINT_STYLES[c_ctr+2], label='Linear Scan (inside PRM)', color = str("C")+str(c_ctr+2))
-points4 = plt.plot(N, LSOPRM_etime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_etime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_RE_TIME, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_etime, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 
@@ -404,7 +428,8 @@ if(PLOT_CIRCUITORAM):
   errbar2 = plt.errorbar(N, CircuitORAM_ctime, CircuitORAM_ctime_err, None, 'r', ls='none', mew=3)
 if(PLOT_LSIPRM):
   errbar3 = plt.errorbar(N, LSIPRM_ctime, LSIPRM_ctime_err, None, 'r', ls='none', mew=3)
-errbar4 = plt.errorbar(N, LSOPRM_etime, LSOPRM_etime_err, None, 'r', ls='none', mew=3)
+if(PLOT_ZEROTRACE):
+  errbar4 = plt.errorbar(N, LSOPRM_etime, LSOPRM_etime_err, None, 'r', ls='none', mew=3)
 errbar5 = plt.errorbar(N, XPIR_RE_TIME, XPIR_RE_STD, None, 'r', ls='none', mew=3)
 errbar6 = plt.errorbar(N, SealPIR_etime, SealPIR_etime_err , None, 'r', ls='none', mew=3)
 
@@ -414,7 +439,8 @@ if(PLOT_CIRCUITORAM):
   plt.setp(points2, 'mew', '3.0')
 if(PLOT_LSIPRM):
   plt.setp(points3, 'mew', '3.0')
-plt.setp(points4, 'mew', '3.0')
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 #plt.setp(line1, 'linewidth', '2.0')
@@ -451,7 +477,8 @@ if(PLOT_CIRCUITORAM):
   points2 = plt.plot(N, CircuitORAM_ctime, POINT_STYLES[c_ctr+1], label='CircuitORAM', color = str("C")+str(c_ctr+1))
 if(PLOT_LSIPRM):
   points3 = plt.plot(N, LSIPRM_ctime, POINT_STYLES[c_ctr+2], label='Linear Scan (inside PRM)', color = str("C")+str(c_ctr+2))
-points4 = plt.plot(N, LSOPRM_ctime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_ctime, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_ctime, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_ctime, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 
@@ -461,7 +488,8 @@ if(PLOT_CIRCUITORAM):
   errbar2 = plt.errorbar(N, CircuitORAM_ctime, CircuitORAM_ctime_err, None, 'r', ls='none', mew=3)
 if(PLOT_LSIPRM):
   errbar3 = plt.errorbar(N, LSIPRM_ctime, LSIPRM_ctime_err, None, 'r', ls='none', mew=3)
-errbar4 = plt.errorbar(N, LSOPRM_ctime, LSOPRM_ctime_err, None, 'r', ls='none', mew=3)
+if(PLOT_ZEROTRACE):
+  errbar4 = plt.errorbar(N, LSOPRM_ctime, LSOPRM_ctime_err, None, 'r', ls='none', mew=3)
 errbar5 = plt.errorbar(N, XPIR_ctime, XPIR_ctime_err, None, 'r', ls='none', mew=3)
 errbar6 = plt.errorbar(N, SealPIR_ctime, SealPIR_ctime_err , None, 'r', ls='none', mew=3)
 
@@ -471,7 +499,8 @@ if(PLOT_CIRCUITORAM):
   plt.setp(points2, 'mew', '3.0')
 if(PLOT_LSIPRM):
   plt.setp(points3, 'mew', '3.0')
-plt.setp(points4, 'mew', '3.0')
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 #plt.setp(line1, 'linewidth', '2.0')
@@ -507,7 +536,8 @@ if(PLOT_CIRCUITORAM):
   points2 = plt.plot(N, CircuitORAM_time, POINT_STYLES[c_ctr+1], label='CircuitORAM', color = str("C")+str(c_ctr+1))
 if(PLOT_LSIPRM):
   points3 = plt.plot(N, LSIPRM_time, POINT_STYLES[c_ctr+2], label='Linear Scan (inside PRM)', color = str("C")+str(c_ctr+2))
-points4 = plt.plot(N, LSOPRM_time, POINT_STYLES[c_ctr+3], label='Linear Scan (outside PRM)', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_time, POINT_STYLES[c_ctr+3], label='Linear Scan (outside PRM)', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_time, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_time, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 #points7 = plt.plot(N, SealPIR_D1_time, POINT_STYLES[c_ctr+6], label='SealPIR D=1', color = str("C")+str(c_ctr+5))
@@ -518,7 +548,8 @@ if(PLOT_CIRCUITORAM):
   errbar2 = plt.errorbar(N, CircuitORAM_time, CircuitORAM_time_err, None, 'r', ls='none', mew=3)
 if(PLOT_LSIPRM):
   errbar3 = plt.errorbar(N, LSIPRM_time, LSIPRM_time_err, None, 'r', ls='none', mew=3)
-errbar4 = plt.errorbar(N, LSOPRM_time, LSOPRM_time_err, None, 'r', ls='none', mew=3)
+if(PLOT_ZEROTRACE):
+  errbar4 = plt.errorbar(N, LSOPRM_time, LSOPRM_time_err, None, 'r', ls='none', mew=3)
 errbar5 = plt.errorbar(N, XPIR_time, XPIR_time_err, None, 'r', ls='none', mew=3)
 errbar6 = plt.errorbar(N, SealPIR_time, SealPIR_time_err , None, 'r', ls='none', mew=3)
 
@@ -528,7 +559,8 @@ if(PLOT_CIRCUITORAM):
   plt.setp(points2, 'mew', '3.0')
 if(PLOT_LSIPRM):
   plt.setp(points3, 'mew', '3.0')
-plt.setp(points4, 'mew', '3.0')
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 #plt.setp(points7, 'mew', '3.0')
@@ -561,11 +593,14 @@ plt.xscale('log')
 
 c_ctr=0
 
-points4 = plt.plot(N, LSOPRM_query_size, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_query_size, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_REQUEST_SIZE, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_query_size, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 
-plt.setp(points4, 'mew', '3.0')
+
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 
@@ -595,12 +630,15 @@ c_ctr=0
 
 TrivialPIR_size = np.multiply(N, DESC_SIZE)
 
-points4 = plt.plot(N, LSOPRM_response_size, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_response_size, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_RESPONSE_SIZE, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_response_size, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 points7 = plt.plot(N, TrivialPIR_size, POINT_STYLES[c_ctr+6], label='Trivial PIR', color = str("C")+str(c_ctr+6))
 
-plt.setp(points4, 'mew', '3.0')
+
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 plt.setp(points7, 'mew', '3.0')
@@ -633,12 +671,16 @@ LSOPRM_bw = np.add(LSOPRM_query_size, LSOPRM_response_size)
 XPIR_bw = np.add(XPIR_REQUEST_SIZE, XPIR_RESPONSE_SIZE)
 SealPIR_bw = np.add(SealPIR_query_size, SealPIR_response_size)
 
-points4 = plt.plot(N, LSOPRM_bw, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
+
+if(PLOT_ZEROTRACE):
+  points4 = plt.plot(N, LSOPRM_bw, POINT_STYLES[c_ctr+3], label='ZeroTrace', color = str("C")+str(c_ctr+3))
 points5 = plt.plot(N, XPIR_bw, POINT_STYLES[c_ctr+4], label='XPIR', color = str("C")+str(c_ctr+4))
 points6 = plt.plot(N, SealPIR_bw, POINT_STYLES[c_ctr+5], label='SealPIR', color = str("C")+str(c_ctr+5))
 points7 = plt.plot(N, TrivialPIR_size, POINT_STYLES[c_ctr+6], label='Trivial PIR', color = str("C")+str(c_ctr+6))
 
-plt.setp(points4, 'mew', '3.0')
+
+if(PLOT_ZEROTRACE):
+  plt.setp(points4, 'mew', '3.0')
 plt.setp(points5, 'mew', '3.0')
 plt.setp(points6, 'mew', '3.0')
 plt.setp(points7, 'mew', '3.0')

+ 18 - 12
reproduce_results.sh

@@ -1,21 +1,27 @@
 #!/bin/bash
 
-docker run -dt --name spir_container spir_image
-docker exec -t spir_container bash -c "cd /pir/ && ./run_sealpir.sh"
-docker cp spir_container:/pir/log_SEALPIR ./plotter
-docker rm -f spir_container
+SGX_FLAG=[ -e "/dev/isgx" ]
+SGX_FLAG=0
+if $SGX_FLAG
+then
+  docker run --device /dev/isgx -dt --name zt_container zt_image bash -c "start-aesmd && exec bash"
+  #docker exec -t zt_container bash -c "cd /pir/ && ./run_ztlsoram.sh"
+  #docker exec -t zt_container bash -c "cd /pir/ && ./run_zthsoram.sh"
+  #docker cp zt_container:/pir/log_ZTLSORAM ./plotter
+  #docker cp zt_container:/pir/log_ZTCIRCUITORAM ./plotter
+  docker rm -f zt_container
+else
+  echo "Skipping ZeroTrace since the device does not have SGX driver installed."
+fi
 
 docker run -dt --name xpir_container xpir_image
 docker exec -t xpir_container bash -c "cd /pir/ && ./run_xpir.sh"
 docker cp xpir_container:/pir/Results/XPIR ./plotter
 docker rm -f xpir_container
 
-docker run --device /dev/isgx -dt --name zt_container zt_image bash -c "start-aesmd && exec bash"
-docker exec -t zt_container bash -c "cd /pir/ && ./run_ztlsoram.sh"
-docker exec -t zt_container bash -c "cd /pir/ && ./run_zthsoram.sh"
-docker cp zt_container:/pir/log_ZTLSORAM ./plotter
-docker cp zt_container:/pir/log_ZTCIRCUITORAM ./plotter
-docker rm -f zt_container
+docker run -dt --name spir_container spir_image
+docker exec -t spir_container bash -c "cd /pir/ && ./run_sealpir.sh"
+docker cp spir_container:/pir/log_SEALPIR ./plotter
+docker rm -f spir_container
 
-cd plotter
-./gen_graphs.py
+cd ./plotter && ./gen_graphs.py $SGX_FLAG