Rename "occlum_context" to "occlum_instance" for demos
This commit is contained in:
parent
85501d8993
commit
0252f0949d
@ -32,7 +32,7 @@ Note that the Occlum toolchain is not cross-compiling in the traditional sense:
|
|||||||
|
|
||||||
**Step 2. Initialize a directory as the Occlum instance via `occlum init`**
|
**Step 2. Initialize a directory as the Occlum instance via `occlum init`**
|
||||||
```
|
```
|
||||||
$ mkdir occlum_context && cd occlum_context
|
$ mkdir occlum_instance && cd occlum_instance
|
||||||
$ occlum init
|
$ occlum init
|
||||||
```
|
```
|
||||||
The `occlum init` command creates the compile-time and run-time state of Occlum in the current working directory. Each Occlum instance directory should be used for a single instance of an application; multiple applications or different instances of a single application should use different Occlum instances.
|
The `occlum init` command creates the compile-time and run-time state of Occlum in the current working directory. Each Occlum instance directory should be used for a single instance of an application; multiple applications or different instances of a single application should use different Occlum instances.
|
||||||
|
2
demos/embedded_mode/.gitignore
vendored
2
demos/embedded_mode/.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
.occlum
|
.occlum
|
||||||
occlum_context
|
occlum_instance
|
||||||
|
@ -3,15 +3,15 @@ SGX_MODE ?= HW
|
|||||||
|
|
||||||
.PHONY: all build_src test clean
|
.PHONY: all build_src test clean
|
||||||
|
|
||||||
all: occlum_context
|
all: occlum_instance
|
||||||
|
|
||||||
occlum_context: build_src
|
occlum_instance: build_src
|
||||||
@mkdir -p occlum_context
|
@mkdir -p occlum_instance
|
||||||
@cd occlum_context && \
|
@cd occlum_instance && \
|
||||||
occlum init && \
|
occlum init && \
|
||||||
cp ../trusted_memcpy_bench/build/trusted_memcpy_bench image/bin/ && \
|
cp ../trusted_memcpy_bench/build/trusted_memcpy_bench image/bin/ && \
|
||||||
occlum build
|
occlum build
|
||||||
@cp -r occlum_context/.occlum .occlum
|
@cp -r occlum_instance/.occlum .occlum
|
||||||
|
|
||||||
build_src:
|
build_src:
|
||||||
@$(MAKE) --no-print-directory -C trusted_memcpy_bench
|
@$(MAKE) --no-print-directory -C trusted_memcpy_bench
|
||||||
@ -25,4 +25,4 @@ test:
|
|||||||
clean:
|
clean:
|
||||||
@$(MAKE) --no-print-directory -C trusted_memcpy_bench clean
|
@$(MAKE) --no-print-directory -C trusted_memcpy_bench clean
|
||||||
@$(MAKE) --no-print-directory -C bench_driver clean
|
@$(MAKE) --no-print-directory -C bench_driver clean
|
||||||
@rm -rf .occlum occlum_context
|
@rm -rf .occlum occlum_instance
|
||||||
|
2
demos/fish/.gitignore
vendored
2
demos/fish/.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
ncurses/
|
ncurses/
|
||||||
fish-shell/
|
fish-shell/
|
||||||
busybox/
|
busybox/
|
||||||
occlum-context/
|
occlum-instance/
|
||||||
occlum-test/
|
occlum-test/
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -rf occlum-context
|
rm -rf occlum-instance
|
||||||
mkdir occlum-context && cd occlum-context
|
mkdir occlum-instance && cd occlum-instance
|
||||||
occlum init
|
occlum init
|
||||||
mkdir -p image/usr/bin
|
mkdir -p image/usr/bin
|
||||||
cp ../Occlum.json .
|
cp ../Occlum.json .
|
||||||
|
2
demos/gdb_support/.gitignore
vendored
2
demos/gdb_support/.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
sample
|
sample
|
||||||
occlum_context
|
occlum_instance
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -rf occlum_context && mkdir -p occlum_context
|
rm -rf occlum_instance && mkdir -p occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
# 1. Initialize a directory as the Occlum instance
|
# 1. Initialize a directory as the Occlum instance
|
||||||
occlum init
|
occlum init
|
||||||
|
|
||||||
|
2
demos/golang/.gitignore
vendored
2
demos/golang/.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
occlum_context/
|
occlum_instance/
|
||||||
web_server
|
web_server
|
||||||
|
@ -13,8 +13,8 @@ if [ ! -f $web_server ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 1. Init Occlum Workspace
|
# 1. Init Occlum Workspace
|
||||||
rm -rf occlum_context && mkdir occlum_context
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "380MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "380MB" |
|
||||||
.process.default_mmap_size = "300MB"' Occlum.json)" && \
|
.process.default_mmap_size = "300MB"' Occlum.json)" && \
|
||||||
|
@ -12,9 +12,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf occlum_context
|
rm -rf occlum_instance
|
||||||
mkdir occlum_context
|
mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
|
|
||||||
occlum init
|
occlum init
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
@ -11,9 +11,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf occlum_context
|
rm -rf occlum_instance
|
||||||
mkdir occlum_context
|
mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
|
|
||||||
occlum init
|
occlum init
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
|
2
demos/java/.gitignore
vendored
2
demos/java/.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
occlum_context/
|
occlum_instance/
|
||||||
gs-messaging-stomp-websocket/
|
gs-messaging-stomp-websocket/
|
||||||
*/*.class
|
*/*.class
|
||||||
|
@ -21,8 +21,8 @@ check_file_exist() {
|
|||||||
|
|
||||||
init_workspace() {
|
init_workspace() {
|
||||||
# Init Occlum Workspace
|
# Init Occlum Workspace
|
||||||
rm -rf occlum_context && mkdir occlum_context
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "1400MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "1400MB" |
|
||||||
.resource_limits.kernel_space_heap_size="64MB" |
|
.resource_limits.kernel_space_heap_size="64MB" |
|
||||||
|
2
demos/local_attestation/.gitignore
vendored
2
demos/local_attestation/.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
bin
|
bin
|
||||||
deps
|
deps
|
||||||
occlum_context
|
occlum_instance
|
||||||
DiffieHellmanLibrary/*.cpp
|
DiffieHellmanLibrary/*.cpp
|
||||||
DiffieHellmanLibrary/*.so
|
DiffieHellmanLibrary/*.so
|
||||||
DiffieHellmanLibrary/*.o
|
DiffieHellmanLibrary/*.o
|
||||||
|
@ -10,17 +10,17 @@ occlum_=$(CUR_DIR)/../..
|
|||||||
|
|
||||||
.PHONY: all build_src test clean
|
.PHONY: all build_src test clean
|
||||||
|
|
||||||
all: occlum_context
|
all: occlum_instance
|
||||||
|
|
||||||
occlum_context: build_src
|
occlum_instance: build_src
|
||||||
@mkdir -p occlum_context
|
@mkdir -p occlum_instance
|
||||||
@cd occlum_context && \
|
@cd occlum_instance && \
|
||||||
occlum init && \
|
occlum init && \
|
||||||
cp $(CUR_DIR)/AppResponder/responder image/bin/ && \
|
cp $(CUR_DIR)/AppResponder/responder image/bin/ && \
|
||||||
cp $(OPENSSL)/libcrypto.so.1.1 image/lib/ && \
|
cp $(OPENSSL)/libcrypto.so.1.1 image/lib/ && \
|
||||||
cp $(CUR_DIR)/DiffieHellmanLibrary/libecdh.so image/lib/ && \
|
cp $(CUR_DIR)/DiffieHellmanLibrary/libecdh.so image/lib/ && \
|
||||||
occlum build
|
occlum build
|
||||||
@cp -r occlum_context/.occlum .occlum
|
@cp -r occlum_instance/.occlum .occlum
|
||||||
|
|
||||||
build_src:
|
build_src:
|
||||||
@$(MAKE) --no-print-directory -C DiffieHellmanLibrary
|
@$(MAKE) --no-print-directory -C DiffieHellmanLibrary
|
||||||
@ -37,4 +37,4 @@ clean:
|
|||||||
@$(MAKE) --no-print-directory -C AppResponder clean
|
@$(MAKE) --no-print-directory -C AppResponder clean
|
||||||
@$(MAKE) --no-print-directory -C EnclaveInitiator clean
|
@$(MAKE) --no-print-directory -C EnclaveInitiator clean
|
||||||
@$(MAKE) --no-print-directory -C DiffieHellmanLibrary clean
|
@$(MAKE) --no-print-directory -C DiffieHellmanLibrary clean
|
||||||
@rm -rf .occlum occlum_context $(BUILD_DIR)
|
@rm -rf .occlum occlum_instance $(BUILD_DIR)
|
||||||
|
2
demos/openvino/.gitignore
vendored
2
demos/openvino/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
deps/
|
deps/
|
||||||
openvino_src/
|
openvino_src/
|
||||||
model/
|
model/
|
||||||
occlum_context/
|
occlum_instance/
|
||||||
|
@ -5,9 +5,9 @@ occlum_lib=/usr/local/occlum/x86_64-linux-musl/lib
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 1. Init Occlum Workspace
|
# 1. Init Occlum Workspace
|
||||||
rm -rf occlum_context
|
rm -rf occlum_instance
|
||||||
mkdir occlum_context
|
mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
new_json="$(jq '.resource_limits.user_space_size = "320MB" |
|
new_json="$(jq '.resource_limits.user_space_size = "320MB" |
|
||||||
.process.default_mmap_size = "256MB"' Occlum.json)" && \
|
.process.default_mmap_size = "256MB"' Occlum.json)" && \
|
||||||
|
2
demos/python/.gitignore
vendored
2
demos/python/.gitignore
vendored
@ -1 +1 @@
|
|||||||
occlum_context/
|
occlum_instance/
|
||||||
|
@ -38,4 +38,4 @@ Step 4 (in the Occlum container): Run the sample code on Occlum via
|
|||||||
```
|
```
|
||||||
./run_python_on_occlum.sh
|
./run_python_on_occlum.sh
|
||||||
```
|
```
|
||||||
It will process CSV data files and generate a file (`smvlight.dat`) in `./occlum_context`.
|
It will process CSV data files and generate a file (`smvlight.dat`) in `./occlum_instance`.
|
||||||
|
@ -12,8 +12,8 @@ if [ ! -d $alpine_fs ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 1. Init Occlum Workspace
|
# 1. Init Occlum Workspace
|
||||||
[ -d occlum_context ] || mkdir occlum_context
|
[ -d occlum_instance ] || mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
[ -d image ] || occlum init
|
[ -d image ] || occlum init
|
||||||
|
|
||||||
# 2. Copy files into Occlum Workspace and build
|
# 2. Copy files into Occlum Workspace and build
|
||||||
|
@ -7,7 +7,7 @@ occlum-cargo build
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
# initialize occlum workspace
|
# initialize occlum workspace
|
||||||
rm -rf occlum_context && mkdir occlum_context && cd occlum_context
|
rm -rf occlum_instance && mkdir occlum_instance && cd occlum_instance
|
||||||
|
|
||||||
occlum init
|
occlum init
|
||||||
cp ../rust_app/target/x86_64-unknown-linux-musl/debug/rust_app image/bin
|
cp ../rust_app/target/x86_64-unknown-linux-musl/debug/rust_app image/bin
|
||||||
|
2
demos/sqlite/.gitignore
vendored
2
demos/sqlite/.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
sqlite_src/
|
sqlite_src/
|
||||||
occlum_context/
|
occlum_instance/
|
||||||
sqlite_demo
|
sqlite_demo
|
||||||
|
@ -19,8 +19,8 @@ if [ ! -e $DEMO ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 1. Init Occlum Workspace
|
# 1. Init Occlum Workspace
|
||||||
rm -rf occlum_context && mkdir occlum_context
|
rm -rf occlum_instance && mkdir occlum_instance
|
||||||
cd occlum_context
|
cd occlum_instance
|
||||||
occlum init
|
occlum init
|
||||||
|
|
||||||
# 2. Copy files into Occlum Workspace and build
|
# 2. Copy files into Occlum Workspace and build
|
||||||
|
Loading…
Reference in New Issue
Block a user