diff --git a/README.md b/README.md index fead064a..8fce6b74 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Step 4-5 are to be done on the guest OS running inside the Docker container: ``` cd /opt/intel/sgxsdk/SampleCode/SampleEnclave && make && ./app ``` -5. Check out Occlum's demos preinstalled at `/root/occlum/demos`, whose README can be found [here](demo/README.md). Or you can try to build and run your own SGX-protected applications using Occlum like these demos. +5. Check out Occlum's demos preinstalled at `/root/occlum/demos`, whose README can be found [here](demos/README.md). Or you can try to build and run your own SGX-protected applications using Occlum as shown in the demos. ## How to Build and Install diff --git a/demos/README.md b/demos/README.md new file mode 100644 index 00000000..9db3a032 --- /dev/null +++ b/demos/README.md @@ -0,0 +1,9 @@ +# Demos + +This directory contains sample projects that demonstrate how Occlum can be used to build and run user applications. + +* `hello_c/`: A sample C project built with Makefile/CMake. +* `hello_cc/`: A sample C++ project built with Makefile/CMake. +* `hello_bazel/`: A sample C++ project built with [Bazel](https://bazel.build). +* `https_server/`: A HTTPS file server based on [Mongoose Embedded Web Server Library](https://github.com/cesanta/mongoose). +* `tensorflow_lite/`: A demo and benchmark of [Tensorflow Lite](https://www.tensorflow.org/lite) inference engine. diff --git a/demo/hello_bazel/.gitignore b/demos/hello_bazel/.gitignore similarity index 100% rename from demo/hello_bazel/.gitignore rename to demos/hello_bazel/.gitignore diff --git a/demo/hello_bazel/README.md b/demos/hello_bazel/README.md similarity index 95% rename from demo/hello_bazel/README.md rename to demos/hello_bazel/README.md index 715f8adf..6d1e5018 100644 --- a/demo/hello_bazel/README.md +++ b/demos/hello_bazel/README.md @@ -1,4 +1,4 @@ -# C++ Sample Project with Bazel +# A Sample C++ Project with Bazel This project demonstrates how to use Bazel to build C++ projects for Occlum. To install Bazel on Ubuntu, follow the instructions [here](https://docs.bazel.build/versions/master/install-ubuntu.html). diff --git a/demo/hello_bazel/build_bazel_sample.sh b/demos/hello_bazel/build_bazel_sample.sh similarity index 100% rename from demo/hello_bazel/build_bazel_sample.sh rename to demos/hello_bazel/build_bazel_sample.sh diff --git a/demo/hello_c/.gitignore b/demos/hello_c/.gitignore similarity index 100% rename from demo/hello_c/.gitignore rename to demos/hello_c/.gitignore diff --git a/demo/hello_c/CMakeLists.txt b/demos/hello_c/CMakeLists.txt similarity index 100% rename from demo/hello_c/CMakeLists.txt rename to demos/hello_c/CMakeLists.txt diff --git a/demo/hello_c/Makefile b/demos/hello_c/Makefile similarity index 100% rename from demo/hello_c/Makefile rename to demos/hello_c/Makefile diff --git a/demo/hello_c/README.md b/demos/hello_c/README.md similarity index 93% rename from demo/hello_c/README.md rename to demos/hello_c/README.md index e4c57b24..b19ae2b9 100644 --- a/demo/hello_c/README.md +++ b/demos/hello_c/README.md @@ -1,4 +1,4 @@ -# C Sample Project with Makefile and CMake +# A Sample C Project with Makefile and CMake This project demonstrates how to use Makefile/CMake to build C projects for Occlum. diff --git a/demo/hello_c/hello_world.c b/demos/hello_c/hello_world.c similarity index 100% rename from demo/hello_c/hello_world.c rename to demos/hello_c/hello_world.c diff --git a/demo/hello_cc/.gitignore b/demos/hello_cc/.gitignore similarity index 100% rename from demo/hello_cc/.gitignore rename to demos/hello_cc/.gitignore diff --git a/demo/hello_cc/CMakeLists.txt b/demos/hello_cc/CMakeLists.txt similarity index 100% rename from demo/hello_cc/CMakeLists.txt rename to demos/hello_cc/CMakeLists.txt diff --git a/demo/hello_cc/Makefile b/demos/hello_cc/Makefile similarity index 100% rename from demo/hello_cc/Makefile rename to demos/hello_cc/Makefile diff --git a/demo/hello_cc/README.md b/demos/hello_cc/README.md similarity index 93% rename from demo/hello_cc/README.md rename to demos/hello_cc/README.md index f212b1e4..a6be4f1d 100644 --- a/demo/hello_cc/README.md +++ b/demos/hello_cc/README.md @@ -1,4 +1,4 @@ -# C++ Sample Project with Makefile and CMake +# A Sample C++ Project with Makefile and CMake This project demonstrates how to use Makefile/CMake to build C++ projects for Occlum. diff --git a/demo/hello_cc/hello_world.cc b/demos/hello_cc/hello_world.cc similarity index 100% rename from demo/hello_cc/hello_world.cc rename to demos/hello_cc/hello_world.cc diff --git a/demo/https_server/.gitignore b/demos/https_server/.gitignore similarity index 100% rename from demo/https_server/.gitignore rename to demos/https_server/.gitignore diff --git a/demo/https_server/README.md b/demos/https_server/README.md similarity index 100% rename from demo/https_server/README.md rename to demos/https_server/README.md diff --git a/demo/https_server/download_and_build_mongoose.sh b/demos/https_server/download_and_build_mongoose.sh similarity index 100% rename from demo/https_server/download_and_build_mongoose.sh rename to demos/https_server/download_and_build_mongoose.sh diff --git a/demo/https_server/run_https_server_in_linux.sh b/demos/https_server/run_https_server_in_linux.sh similarity index 100% rename from demo/https_server/run_https_server_in_linux.sh rename to demos/https_server/run_https_server_in_linux.sh diff --git a/demo/https_server/run_https_server_in_occlum.sh b/demos/https_server/run_https_server_in_occlum.sh similarity index 100% rename from demo/https_server/run_https_server_in_occlum.sh rename to demos/https_server/run_https_server_in_occlum.sh diff --git a/demo/tensorflow_lite/.gitignore b/demos/tensorflow_lite/.gitignore similarity index 100% rename from demo/tensorflow_lite/.gitignore rename to demos/tensorflow_lite/.gitignore diff --git a/demo/tensorflow_lite/README.md b/demos/tensorflow_lite/README.md similarity index 65% rename from demo/tensorflow_lite/README.md rename to demos/tensorflow_lite/README.md index a873cbc0..49839a7f 100644 --- a/demo/tensorflow_lite/README.md +++ b/demos/tensorflow_lite/README.md @@ -1,4 +1,6 @@ -# Use Tensorflow Lite in SGX with Occlum +# Use Tensorflow Lite with Occlum + +This project demonstrates how Occlum enables [Tensorflow Lite](https://www.tensorflow.org/lite) in SGX enclaves. Step 1: Download Tensorflow, build Tensorflow Lite, and download models ``` @@ -16,12 +18,12 @@ Step 2.2: To run TensorFlow Lite inference benchmark in Occlum, run ./run_tflite_in_occlum.sh benchmark ``` -Step 3.1: To run TensorFlow Lite inference demo in Linux, run +Step 3.1 (Optional): To run TensorFlow Lite inference demo in Linux, run ``` ./run_tflite_in_linux.sh demo ``` -Step 3.2: To run TensorFlow Lite inference benchmark in Linux, run +Step 3.2 (Optional): To run TensorFlow Lite inference benchmark in Linux, run ``` ./run_tflite_in_linux.sh benchmark ``` diff --git a/demo/tensorflow_lite/download_and_build_tflite.sh b/demos/tensorflow_lite/download_and_build_tflite.sh similarity index 100% rename from demo/tensorflow_lite/download_and_build_tflite.sh rename to demos/tensorflow_lite/download_and_build_tflite.sh diff --git a/demo/tensorflow_lite/patch/fix-tflite-Makefile-v1.15.0-rc0.diff b/demos/tensorflow_lite/patch/fix-tflite-Makefile-v1.15.0-rc0.diff similarity index 100% rename from demo/tensorflow_lite/patch/fix-tflite-Makefile-v1.15.0-rc0.diff rename to demos/tensorflow_lite/patch/fix-tflite-Makefile-v1.15.0-rc0.diff diff --git a/demo/tensorflow_lite/run_tflite_in_linux.sh b/demos/tensorflow_lite/run_tflite_in_linux.sh similarity index 100% rename from demo/tensorflow_lite/run_tflite_in_linux.sh rename to demos/tensorflow_lite/run_tflite_in_linux.sh diff --git a/demo/tensorflow_lite/run_tflite_in_occlum.sh b/demos/tensorflow_lite/run_tflite_in_occlum.sh similarity index 100% rename from demo/tensorflow_lite/run_tflite_in_occlum.sh rename to demos/tensorflow_lite/run_tflite_in_occlum.sh diff --git a/src/libos/Cargo.toml b/src/libos/Cargo.toml index be33ba2c..e8f7cb9b 100644 --- a/src/libos/Cargo.toml +++ b/src/libos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "Occlum" -version = "0.5.0" +version = "0.6.0" [lib] name = "occlum_rs"