Signed-off-by: 景涛 <jingtao3@hust.edu.cn>
fix some typo error
This commit is contained in:
parent
fca6164019
commit
3e1ffd2b24
@ -15,7 +15,7 @@ busybox echo $DATE
|
||||
TEST=$(busybox echo $(busybox date))
|
||||
busybox echo $TEST
|
||||
|
||||
# Test command subsitution and pipe
|
||||
# Test command substitution and pipe
|
||||
busybox echo $(busybox echo -e "Hello-world-from-bash\n test" | busybox awk '$1=$1' FS="-" OFS=" ")
|
||||
|
||||
# Test multiple redirection
|
||||
@ -62,7 +62,7 @@ cd /host
|
||||
pwd
|
||||
cd -
|
||||
|
||||
# Test ulimit defined below will overide configuration in Occlum.json
|
||||
# Test ulimit defined below will override configuration in Occlum.json
|
||||
ulimit -Ss 10240 # stack size 10M
|
||||
ulimit -Sd 40960 # heap size 40M
|
||||
ulimit -Sv 122880 # virtual memory size 120M (including heap, stack, mmap size)
|
||||
|
@ -4,7 +4,7 @@ set -e
|
||||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
TAG=1.0.20
|
||||
SYSBENCH_ISNTALL_DIR=${SCRIPT_DIR}/sysbench-install
|
||||
SYSBENCH_INSTALL_DIR=${SCRIPT_DIR}/sysbench-install
|
||||
|
||||
rm -rf sysbench-* $TAG.tar.gz*
|
||||
wget https://github.com/akopytov/sysbench/archive/refs/tags/$TAG.tar.gz
|
||||
@ -12,7 +12,7 @@ tar zxvf $TAG.tar.gz
|
||||
|
||||
pushd sysbench-$TAG
|
||||
./autogen.sh
|
||||
./configure --without-mysql --prefix=${SYSBENCH_ISNTALL_DIR}
|
||||
./configure --without-mysql --prefix=${SYSBENCH_INSTALL_DIR}
|
||||
make -j
|
||||
make install
|
||||
popd
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Docker Image for Deployment
|
||||
|
||||
For deployment purpose, we would like to see the image as small as possible. However, Occlum has a variaty of dependencies which is not friendly if users want to deploy the application.
|
||||
For deployment purpose, we would like to see the image as small as possible. However, Occlum has a variety of dependencies which is not friendly if users want to deploy the application.
|
||||
|
||||
With the help of [docker multistage build](https://docs.docker.com/develop/develop-images/multistage-build/) and `occlum package` command, we provide dockerfile templates to build a image with the smallest size for deployment environment.
|
||||
|
||||
Checkout the dockerfile templates for [Ubuntu](./Dockerfile_template.ubuntu18.04) and [CentOS](./Dockerfile_template.centos8.2). There are three stages in each dockerfile:
|
||||
|
||||
- base stage: This stage configures the package management systems of specific OS and intall required packages for deployment, including `occlum-runtime` and sgx-psw packages. If users want to install specific version of packages, modification should be done in this stage.
|
||||
- base stage: This stage configures the package management systems of specific OS and install required packages for deployment, including `occlum-runtime` and sgx-psw packages. If users want to install specific version of packages, modification should be done in this stage.
|
||||
|
||||
- packager stage: This stage is to build and package the application for deployment. User should also finish the enclave signing in this stage.Users can build your own applications and put to occlum instance. And then use "occlum build" and "occlum package" commands to get a minimum subset of files to run in deployment environment. To support full Occlum commands, extra dependencies are installed.
|
||||
|
||||
|
@ -8,7 +8,7 @@ Step 1: Download and build Enclave TLS.
|
||||
```
|
||||
When completed, the resulting server can be found at `/opt/enclave-tls/bin`.
|
||||
|
||||
Step 2: You can run the encalve tls server on Occlum.
|
||||
Step 2: You can run the enclave tls server on Occlum.
|
||||
```shell
|
||||
./run_enclave_tls_server_in_occlum.sh
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ As demonstrated here, Occlum supports executing any script file that begins with
|
||||
at its first line by invoking the interpreter program specified with the shebang.
|
||||
|
||||
### Step 1:
|
||||
Downlaod FISH and busybox and build them with Occlum tool chain:
|
||||
Download FISH and busybox and build them with Occlum tool chain:
|
||||
```
|
||||
./download_and_build.sh
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /usr/bin/fish
|
||||
ulimit -a
|
||||
|
||||
# ulimit defined below will overide configuration in Occlum.json
|
||||
# ulimit defined below will override configuration in Occlum.json
|
||||
ulimit -Sv 122880 # virtual memory size 120M (including heap, stack, mmap size)
|
||||
ulimit -Ss 10240 # stack size 10M
|
||||
ulimit -Sd 40960 # heap size 40M
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Run gRPC C++ Client/Server on Occlum
|
||||
|
||||
## Step 1:
|
||||
Downlaod, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`:
|
||||
Download, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`:
|
||||
```
|
||||
./download_and_install_openssl.sh
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Run gRPC TLS C++ Client/Server on Occlum
|
||||
|
||||
## Step 1:
|
||||
Downlaod, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`:
|
||||
Download, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`:
|
||||
```
|
||||
./download_and_install_openssl.sh
|
||||
```
|
||||
|
@ -53,7 +53,7 @@ void
|
||||
runServer()
|
||||
{
|
||||
/**
|
||||
* [!] Be carefull here using one cert with the CN != localhost. [!]
|
||||
* [!] Be carefully here using one cert with the CN != localhost. [!]
|
||||
**/
|
||||
std::string server_address ( "localhost:50051" );
|
||||
|
||||
|
@ -121,7 +121,7 @@ ATTESTATION_STATUS exchange_report_ocall(sgx_dh_msg2_t *dh_msg2, sgx_dh_msg3_t *
|
||||
* [input] session_id: this is session id allocated by responder enclave
|
||||
* [input] req_message: this is pointer to request message
|
||||
* [input] req_message_size: this is request message size
|
||||
* [input] max_payload_size: this is maxium payload size in response message
|
||||
* [input] max_payload_size: this is maximum payload size in response message
|
||||
* [input, output] this is pointer to response message, the buffer is allocated by initiator enclave and filled by responder enclave
|
||||
* [input] response message size
|
||||
* */
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
||||
|
||||
/* Function Description: This is OCALL interface for initiator enclave to get ECDH message 1 and session id from responder enclave
|
||||
* Parameter Description:
|
||||
* [input, output] dh_msg1: pointer to ecdh msg1 buffer, this buffer is alloated in initiator enclave and filled by reponser enclave
|
||||
* [input, output] dh_msg1: pointer to ecdh msg1 buffer, this buffer is allocated in initiator enclave and filled by reponser enclave
|
||||
* [output] session_id: pointer to session id which is allocated by responder enclave
|
||||
* */
|
||||
uint32_t session_request_ocall(sgx_dh_msg1_t* dh_msg1, uint32_t* session_id);
|
||||
@ -66,7 +66,7 @@ uint32_t exchange_report_ocall(sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, u
|
||||
* [input] session_id: this is session id allocated by responder enclave
|
||||
* [input] req_message: this is pointer to request message
|
||||
* [input] req_message_size: this is request message size
|
||||
* [input] max_payload_size: this is maxium payload size in response message
|
||||
* [input] max_payload_size: this is maximum payload size in response message
|
||||
* [input, output] this is pointer to response message, the buffer is allocated by initiator enclave and filled by responder enclave
|
||||
* [input] response message size
|
||||
* */
|
||||
|
@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Local attestation Sucess!\n");
|
||||
printf("Local attestation Success!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
* Parameter Description:
|
||||
* [input] fiforequest: this is pointer to request message
|
||||
* [input] fiforequest_size: this is request message size
|
||||
* [output] fiforesponse: this is pointer fo response message, the buffer is allocated inside this function
|
||||
* [output] fiforesponse: this is pointer for response message, the buffer is allocated inside this function
|
||||
* [output] fiforesponse_size: this is response message size
|
||||
* */
|
||||
int client_send_receive(FIFO_MSG *fiforequest, size_t fiforequest_size, FIFO_MSG **fiforesponse, size_t *fiforesponse_size) {
|
||||
|
@ -64,7 +64,7 @@ int session_request(sgx_dh_msg1_t *dh_msg1,
|
||||
}
|
||||
memcpy(&g_dest_session_info_map[*session_id].in_progress.dh_session, &sgx_dh_session,
|
||||
sizeof(sgx_dh_session_t));
|
||||
//Store the session information under the correspoding source enlave id key
|
||||
//Store the session information under the corresponding source enlave id key
|
||||
g_dest_session_info_map[*session_id].status = IN_PROGRESS;
|
||||
|
||||
return SUCCESS;
|
||||
@ -84,7 +84,7 @@ int exchange_report(sgx_dh_msg2_t *dh_msg2,
|
||||
|
||||
memset(&dh_aek, 0, sizeof(sgx_key_128bit_t));
|
||||
do {
|
||||
//Retreive the session information for the corresponding source enclave id
|
||||
//Retrieve the session information for the corresponding source enclave id
|
||||
session_info = &g_dest_session_info_map[session_id];
|
||||
|
||||
memcpy(&sgx_dh_session, &session_info->in_progress.dh_session, sizeof(sgx_dh_session_t));
|
||||
|
@ -84,7 +84,7 @@ index 40c1539..dd8ab9e 100644
|
||||
#endif
|
||||
|
||||
+typedef struct {
|
||||
+ const sgx_target_info_t* target_info; // input (optinal)
|
||||
+ const sgx_target_info_t* target_info; // input (optional)
|
||||
+ const sgx_report_data_t* report_data; // input (optional)
|
||||
+ sgx_report_t* report; // output
|
||||
+} sgxioc_create_report_arg_t;
|
||||
|
@ -122,7 +122,7 @@ uint32_t test_close_session()
|
||||
* For demonstration purpose, we verify below points:
|
||||
* 1. peer enclave's MRSIGNER is as expected
|
||||
* 2. peer enclave's PROD_ID is as expected
|
||||
* 3. peer enclave's attribute is reasonable: it's INITIALIZED'ed enclave; in non-debug build configuraiton, the enlave isn't loaded with enclave debug mode.
|
||||
* 3. peer enclave's attribute is reasonable: it's INITIALIZED'ed enclave; in non-debug build configuration, the enlave isn't loaded with enclave debug mode.
|
||||
**/
|
||||
extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity)
|
||||
{
|
||||
@ -141,7 +141,7 @@ extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t*
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* Function Desciption: Operates on the input secret and generate the output secret
|
||||
/* Function Description: Operates on the input secret and generate the output secret
|
||||
* */
|
||||
uint32_t get_message_exchange_response(uint32_t inp_secret_data)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ ATTESTATION_STATUS create_session(dh_session_t *session_info)
|
||||
memset(&dh_msg3, 0, sizeof(sgx_dh_msg3_t));
|
||||
memset(session_info, 0, sizeof(dh_session_t));
|
||||
|
||||
//Intialize the session as a session initiator
|
||||
//Initialize the session as a session initiator
|
||||
status = sgx_dh_init_session(SGX_DH_SESSION_INITIATOR, &sgx_dh_session);
|
||||
if(SGX_SUCCESS != status)
|
||||
{
|
||||
@ -105,7 +105,7 @@ ATTESTATION_STATUS create_session(dh_session_t *session_info)
|
||||
{
|
||||
return ATTESTATION_SE_ERROR;
|
||||
}
|
||||
//Process the message 1 obtained from desination enclave and generate message 2
|
||||
//Process the message 1 obtained from destination enclave and generate message 2
|
||||
status = sgx_dh_initiator_proc_msg1(&dh_msg1, &dh_msg2, &sgx_dh_session);
|
||||
if(SGX_SUCCESS != status)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ if [ ! -f "$TARGET_SO" ] ; then
|
||||
make -j${nproc} && make install && \
|
||||
echo "Build openssl successfully" || exit 1
|
||||
else
|
||||
echo "The openssl library is aleady existent"
|
||||
echo "The openssl library is already existent"
|
||||
fi
|
||||
|
||||
# Download SGX SDK
|
||||
|
@ -8,7 +8,7 @@ that the CPU_ISSET_S macro defined in musl libc is not quite robust: it
|
||||
expands the first argument more than once (Glibc's counterpart does not
|
||||
have this issue). So if the first argument has any side effect, then the
|
||||
macro will have unexpected consequences. Unfortunately, this is exactly
|
||||
what happens in the orignal code of OpenVINO.
|
||||
what happens in the original code of OpenVINO.
|
||||
---
|
||||
inference-engine/src/mkldnn_plugin/mkldnn_streams.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
@ -4,7 +4,7 @@ pushd ~
|
||||
openssl rand -writerand .rnd
|
||||
popd
|
||||
|
||||
# Geneate self-signed key/cert
|
||||
# Generate self-signed key/cert
|
||||
# Generate valid Flask server Key/Cert
|
||||
openssl genrsa -out flask.key 2048
|
||||
openssl req -nodes -new -key flask.key -subj "/CN=localhost" -out flask.csr
|
||||
|
@ -51,7 +51,7 @@ This tutorial is written under the assumption that you have Docker installed and
|
||||
|
||||
Occlum is compatible with glibc-supported Python, we employ miniconda as python installation tool. You can import PyTorch packages using conda. Here, miniconda is automatically installed by install_python_with_conda.sh script, the required python and PyTorch packages for this project are also loaded by this script. Here, we take occlum/occlum:0.29.3-ubuntu20.04 as example.
|
||||
|
||||
In the following example, we will try to run a distributed PyTorch training using `fasion-MNIST` dataset with 2 processes (Occlum instance).
|
||||
In the following example, we will try to run a distributed PyTorch training using `fashion-MNIST` dataset with 2 processes (Occlum instance).
|
||||
|
||||
Thus, we set `WORLD_SIZE` to 2.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user