From f96a06a0c1b30ef61acceedd3dbd62c3c90fe1d1 Mon Sep 17 00:00:00 2001 From: gezhengqiang Date: Thu, 29 Feb 2024 17:30:00 +0800 Subject: [PATCH] feat(sgx): add sidecar dockerfile --- sgx_network_simulation/Makefile | 21 +++++++++++++++++++++ sgx_network_simulation/requirements.txt | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 sgx_network_simulation/Makefile create mode 100644 sgx_network_simulation/requirements.txt diff --git a/sgx_network_simulation/Makefile b/sgx_network_simulation/Makefile new file mode 100644 index 000000000..d6a128449 --- /dev/null +++ b/sgx_network_simulation/Makefile @@ -0,0 +1,21 @@ +protobuf: + python -m grpc_tools.protoc -I . \ + --python_out=. \ + --grpc_python_out=. \ + service.proto + +gen-grpc-key: + openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 365 -out server.crt \ + -subj "/emailAddress=linfan.fine@bytedance.com/CN=fl-sgx-test.com/O=BBB/OU=BBB" + +docker-build: + cd ../.. && docker build -t sgx_network_simulation:latest -f experiments/sgx_network_simulation/Dockerfile . + +run-docker-server: + docker run -it -p 32443:32443 sgx_network_simulation:latest server + +run-docker-client: + docker run -it sgx_network_simulation:latest client --server_addr=localhost:32101 + +run-docker-debug: + docker run -it --rm sgx_network_simulation:latest diff --git a/sgx_network_simulation/requirements.txt b/sgx_network_simulation/requirements.txt new file mode 100644 index 000000000..7ffa3a28c --- /dev/null +++ b/sgx_network_simulation/requirements.txt @@ -0,0 +1,2 @@ +grpcio==1.41.1 +grpcio-tools==1.41.1