Re: [apache/incubator-teaclave] How about provide a live demo API to experience? (#466)

2021-11-30 Thread master-davidlee
Closed #466.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/466#event-5696153071

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-31 Thread master-davidlee
`ipfs@249:~/incubator-teaclave$ (cd docker && docker-compose -f 
docker-compose-ubuntu-1804-sgx-sim-mode.yml up --build)
Building teaclave-authentication-service-sgx-sim-mode
Step 1/29 : FROM ubuntu:18.04
 ---> c090eaba6b94
Step 2/29 : ENV VERSION 2.9.101.2-bionic1
 ---> Using cache
 ---> c79b094403a2
Step 3/29 : ENV SGX_DOWNLOAD_URL_BASE 
"https://download.01.org/intel-sgx/sgx-linux/2.9.1/distro/ubuntu18.04-server;
 ---> Using cache
 ---> 275d85d58955
Step 4/29 : ENV SGX_LINUX_X64_SDK sgx_linux_x64_sdk_2.9.101.2.bin
 ---> Using cache
 ---> 156c9a878491
Step 5/29 : ENV SGX_LINUX_X64_SDK_URL 
"$SGX_DOWNLOAD_URL_BASE/$SGX_LINUX_X64_SDK"
 ---> Using cache
 ---> 6521903008e8
Step 6/29 : RUN apt-get update && apt-get install -q -y 
libcurl4-openssl-dev libprotobuf-dev curl pkg-config wget
 ---> Using cache
 ---> 04db0a867bcd
Step 7/29 : RUN echo 'deb [arch=amd64] 
https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main' |   tee 
/etc/apt/sources.list.d/intel-sgx.list
 ---> Using cache
 ---> 2961160d045a
Step 8/29 : RUN curl -fsSL  
https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key 
add -
 ---> Using cache
 ---> 164af245f044
Step 9/29 : RUN apt-get update && apt-get install -q -y 
libsgx-launch=$VERSION libsgx-urts=$VERSION libsgx-quote-ex=$VERSION
 ---> Using cache
 ---> f823bb1bca74
Step 10/29 : RUN mkdir /etc/init
 ---> Using cache
 ---> 52c1c3cce471
Step 11/29 : RUN wget $SGX_LINUX_X64_SDK_URL   && chmod u+x 
$SGX_LINUX_X64_SDK  && echo -e 'no\n/opt' | 
./$SGX_LINUX_X64_SDK && rm $SGX_LINUX_X64_SDK && 
echo 'source /opt/sgxsdk/environment' >> /etc/environment
 ---> Using cache
 ---> 688849fbc26e
Step 12/29 : ENV LD_LIBRARY_PATH=/opt/sgxsdk/sdk_libs
 ---> Using cache
 ---> 16060263928f
Step 13/29 : RUN mkdir -p /tmp/fusion_data
 ---> Using cache
 ---> bf1356023ff0
Step 14/29 : ADD release/services/teaclave_frontend_service /teaclave/
 ---> Using cache
 ---> 827d26630464
Step 15/29 : ADD release/services/teaclave_frontend_service_enclave.signed.so 
/teaclave/
 ---> Using cache
 ---> b6fee11daa2f
Step 16/29 : ADD release/services/teaclave_authentication_service /teaclave/
 ---> Using cache
 ---> 9dd52d5fd225
Step 17/29 : ADD 
release/services/teaclave_authentication_service_enclave.signed.so /teaclave/
 ---> Using cache
 ---> 80271d9446bb
Step 18/29 : ADD release/services/teaclave_management_service /teaclave/
 ---> Using cache
 ---> 5a41dca34b9a
Step 19/29 : ADD release/services/teaclave_management_service_enclave.signed.so 
/teaclave/
 ---> Using cache
 ---> 921d3bd8b318
Step 20/29 : ADD release/services/teaclave_scheduler_service /teaclave/
 ---> Using cache
 ---> 30a7046e9939
Step 21/29 : ADD release/services/teaclave_scheduler_service_enclave.signed.so 
/teaclave/
 ---> Using cache
 ---> bad5c52051c3
Step 22/29 : ADD release/services/teaclave_access_control_service /teaclave/
 ---> Using cache
 ---> cfe3f99ee1fb
Step 23/29 : ADD 
release/services/teaclave_access_control_service_enclave.signed.so /teaclave/
 ---> Using cache
 ---> f52abbab7cf3
Step 24/29 : ADD release/services/teaclave_storage_service /teaclave/
 ---> Using cache
 ---> 301b116a6525
Step 25/29 : ADD release/services/teaclave_storage_service_enclave.signed.so 
/teaclave/
 ---> Using cache
 ---> 4211ad0a1ad7
Step 26/29 : ADD release/services/teaclave_execution_service /teaclave/
 ---> Using cache
 ---> 2912ec8a1d15
Step 27/29 : ADD release/services/teaclave_execution_service_enclave.signed.so 
/teaclave/
 ---> Using cache
 ---> 81ffad21ab27
Step 28/29 : ADD release/services/enclave_info.toml /teaclave/
 ---> Using cache
 ---> 3a7b6c47f1a3
Step 29/29 : ADD release/services/auditors /teaclave/auditors
 ---> Using cache
 ---> cd92db5bf5fa

Successfully built cd92db5bf5fa
Successfully tagged docker_teaclave-authentication-service-sgx-sim-mode:latest
Building teaclave-storage-service-sgx-sim-mode
Step 1/29 : FROM ubuntu:18.04
 ---> c090eaba6b94
Step 2/29 : ENV VERSION 2.9.101.2-bionic1
 ---> Using cache
 ---> c79b094403a2
Step 3/29 : ENV SGX_DOWNLOAD_URL_BASE 
"https://download.01.org/intel-sgx/sgx-linux/2.9.1/distro/ubuntu18.04-server;
 ---> Using cache
 ---> 275d85d58955
Step 4/29 : ENV SGX_LINUX_X64_SDK sgx_linux_x64_sdk_2.9.101.2.bin
 ---> Using cache
 ---> 156c9a878491
Step 5/29 : ENV SGX_LINUX_X64_SDK_URL 
"$SGX_DOWNLOAD_URL_BASE/$SGX_LINUX_X64_SDK"
 ---> Using cache
 ---> 6521903008e8
Step 6/29 : RUN apt-get update && apt-get install -q -y 
libcurl4-openssl-dev libprotobuf-dev curl pkg-config wget
 ---> Using cache
 ---> 04db0a867bcd
Step 7/29 : RUN echo 'deb [arch=amd64] 
https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main' |   tee 
/etc/apt/sources.list.d/intel-sgx.list
 ---> Using cache
 ---> 2961160d045a
Step 8/29 : RUN curl -fsSL  
https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key 
add -
 ---> Using cache
 ---> 164af245f044
Step 9/29 : RUN apt-get update 

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-26 Thread master-davidlee
Current Teaclave supports any python machine learning modules?  can I load a 
pickle-dumped machine learning model file in Teaclave and run it?
`import numpy as np

class Linear_Regression:
def __init__(self):
self._w = None

def fit(self, X, y, lr=0.01, epsilon=0.01, epoch=1000):
#训练数据
#将输入的X,y转换为numpy数组
X, y = np.asarray(X, np.float32), np.asarray(y, np.float32)
#给X增加一列常数项
X=np.hstack((X,np.ones((X.shape[0],1
#初始化w
self._w = np.zeros((X.shape[1],1)) 

for _ in range(epoch):
#随机选择一组样本计算梯度
random_num=np.random.choice(len(X))
x_random=X[random_num].reshape(1,2)
y_random=y[random_num]

gradient=(x_random.T)*(np.dot(x_random,self._w)-y_random)

#如果收敛,那么停止迭代
if (np.abs(self._w-lr*gradient)https://github.com/apache/incubator-teaclave/issues/463#issuecomment-768006278

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-26 Thread master-davidlee
Ok, I will try in the real TEE with another PC.And can I load my own machine 
learning model file use Teaclave?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/463#issuecomment-767964867

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-26 Thread master-davidlee
it looks like right at the beginning, but something wrong after a while. Can 
you help me with that?  Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/463#issuecomment-767953467

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-26 Thread master-davidlee
![image](https://user-images.githubusercontent.com/49427668/105930272-569cd380-6084-11eb-80cb-be976ac3d886.png)
![image](https://user-images.githubusercontent.com/49427668/105930317-69170d00-6084-11eb-85e5-6e6c4abe36fd.png)
![image](https://user-images.githubusercontent.com/49427668/105930337-759b6580-6084-11eb-98c8-decc0fef7b08.png)
![image](https://user-images.githubusercontent.com/49427668/105930362-82b85480-6084-11eb-80b5-0510bcb6a856.png)
![image](https://user-images.githubusercontent.com/49427668/105930393-8ea41680-6084-11eb-9309-277468bd2a9c.png)
![image](https://user-images.githubusercontent.com/49427668/105930416-982d7e80-6084-11eb-8f01-5fdcda2bb80a.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/463#issuecomment-767952627

Re: [apache/incubator-teaclave] GPG error: The following signatures couldn't be verified (#471)

2021-01-26 Thread master-davidlee
I remember this command returned OK, but the error still occurred but I have 
fixed it. Can you take look at the other error#463. It bothers me many days 
Thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/471#issuecomment-767942346

Re: [apache/incubator-teaclave] GPG error: The following signatures couldn't be verified (#471)

2021-01-26 Thread master-davidlee
And I use these 2 steps fixed it 
1. the first step is to take note of the public key, for example, there is the 
78BD65473CB3BD13
![image](https://user-images.githubusercontent.com/49427668/105863541-f417e900-602b-11eb-8b12-c5cb368edde7.png)
2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 
(public_key)
Then it should be fixed



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/471#issuecomment-767610458

[apache/incubator-teaclave] GPG error: The following signatures couldn't be verified (#471)

2021-01-26 Thread master-davidlee
when I run the last  command 
![image](https://user-images.githubusercontent.com/49427668/105863271-adc28a00-602b-11eb-83ef-1d0dfc5c6348.png)
I met an error 
![image](https://user-images.githubusercontent.com/49427668/105863327-bfa42d00-602b-11eb-86fd-9be814479865.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/471

[apache/incubator-teaclave] How about provide a live demo API to experience? (#466)

2021-01-20 Thread master-davidlee
I have tried your tutorial about "the first function", but met many errors. 
How about providing a live demo API that includes executing custom python files 
and machine learning to experience?  In this way, people can directly 
experience your work and save a lot of time for both of us.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/466

Re: [apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-20 Thread master-davidlee
I install the python lib, but after I run `(cd docker && docker-compose -f 
docker-compose-ubuntu-1804-sgx-sim-mode.yml up --build)` 
some service will be exited after a while automatically
![image](https://user-images.githubusercontent.com/49427668/105275318-003e1980-5bda-11eb-8b70-c11fe5f675ba.png)
and when I run `SGX_MODE=SW PYTHONPATH=../../sdk/python python3 builtin_echo.py 
'Hello, Teaclave!'`
![image](https://user-images.githubusercontent.com/49427668/105275353-19df6100-5bda-11eb-83fb-6aaae06bacf5.png)
![image](https://user-images.githubusercontent.com/49427668/105275364-22d03280-5bda-11eb-9e2b-421e5901c8b3.png)



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/463#issuecomment-764205387

[apache/incubator-teaclave] Execute builtin_echo.py error (#463)

2021-01-20 Thread master-davidlee
I have launched all the service 
![image](https://user-images.githubusercontent.com/49427668/105189064-896c3680-5b6f-11eb-881d-f0a3bf8f2023.png)
but when I want to run  the example  echo.py
![image](https://user-images.githubusercontent.com/49427668/105189161-a3a61480-5b6f-11eb-9b85-293382fdfd65.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/463

Re: [apache/incubator-teaclave] I a error when use simulate model (#461)

2021-01-20 Thread master-davidlee
Closed #461.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/461#event-4228177502

Re: [apache/incubator-teaclave] I a error when use simulate model (#461)

2021-01-20 Thread master-davidlee
Thanks it work

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/461#issuecomment-763641606

[apache/incubator-teaclave] I a error when use simulate model (#461)

2021-01-19 Thread master-davidlee
I met a error 
![image](https://user-images.githubusercontent.com/49427668/105138662-2c9d5b80-5b30-11eb-8fb5-3c692c99e6cd.png)
and this is my release/services
![image](https://user-images.githubusercontent.com/49427668/105138731-4474df80-5b30-11eb-92df-ab878727b69a.png)
and I successed compiled
![image](https://user-images.githubusercontent.com/49427668/105139407-3c696f80-5b31-11eb-96a2-c40900527e93.png)

_Originally posted by @master-davidlee in 
https://github.com/apache/incubator-teaclave/issues/437#issuecomment-763385226_

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/461

Re: [apache/incubator-teaclave] How solve the runtime error in simulation mode? (#437)

2021-01-19 Thread master-davidlee
I met a similar error 
![image](https://user-images.githubusercontent.com/49427668/105138662-2c9d5b80-5b30-11eb-8fb5-3c692c99e6cd.png)
and this is my release/services
![image](https://user-images.githubusercontent.com/49427668/105138731-4474df80-5b30-11eb-92df-ab878727b69a.png)
what should I do


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/437#issuecomment-763385226

Re: [apache/incubator-teaclave] How to debug Python scripts (#393)

2021-01-17 Thread master-davidlee
Hi, I want to make a delegate machine learning with TEE. How can I load the ML 
model files and run it within Teaclave? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/393#issuecomment-761820236