command.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import os
  2. def install():
  3. # print(("git submodule init"))
  4. # print(os.system("git submodule init"))
  5. # print(("git submodule update"))
  6. # print(os.system("git submodule update"))
  7. # print(("mkdir ./MP-SPDZ/Player-Data"))
  8. # print(os.system("mkdir ./MP-SPDZ/Player-Data"))
  9. # print(("apt-get install automake build-essential git libboost-dev libboost-thread-dev libsodium-dev libssl-dev libtool m4 python texinfo yasm"))
  10. # print(os.system("apt-get install automake build-essential git libboost-dev libboost-thread-dev libsodium-dev libssl-dev libtool m4 python texinfo yasm"))
  11. # print(("./MP-SPDZ/Scripts/tldr.sh"))
  12. # print(os.system("./MP-SPDZ/Scripts/tldr.sh"))
  13. # print(("cd MP-SPDZ && ls && make -j8 tldr"))
  14. # print(os.system("cd MP-SPDZ && ls && make -j8 tldr"))
  15. # print(("create Link from Player"))
  16. # print(os.system("ln -s MP-SPDZ/Player-Data/ ."))
  17. # print(("create Link from local"))
  18. # print(os.system("ln -s MP-SPDZ/local/ ."))
  19. # print(("create Link from Programs"))
  20. # print(os.system("ln -s MP-SPDZ/Programs/ ."))
  21. # print(("./MP-SPDZ/compile.py tutorial"))
  22. # print(os.system("./MP-SPDZ/compile.py tutorial"))
  23. # print(("cd MP-SPDZ && ls && make -j8 mascot-party"))
  24. # print(os.system("cd MP-SPDZ && ls && make -j8 mascot"))
  25. print(("echo 1 2 3 4 > ./Player-Data/Input-P0-0"))
  26. print(os.system("echo 1 2 3 4 > ./Player-Data/Input-P0-0"))
  27. print(("echo 1 2 3 4 > ./Player-Data/Input-P1-0"))
  28. print(os.system("echo 1 2 3 4 > ./Player-Data/Input-P1-0"))
  29. print(("./MP-SPDZ/Scripts/mascot.sh tutorial"))
  30. print(os.system("./MP-SPDZ/Scripts/mascot.sh tutorial"))
  31. def comp(a):
  32. print(("cp to Programs"))
  33. print(os.system("cp ./mpc/"+a+".mpc ./Programs/Source/"))
  34. print(("compile"))
  35. print(os.system("./MP-SPDZ/compile.py "+a))