occlum/demos/grpc/run_client_on_occlum.sh
2021-09-26 21:06:02 +08:00

37 lines
541 B
Bash
Executable File

#!/bin/bash
INSTALL_DIR=/usr/local/occlum/x86_64-linux-musl
export PATH=$PATH:$INSTALL_DIR/bin
cd client
make -j$(nproc)
if [ $? -ne 0 ]
then
echo "demo make failed"
exit 1
fi
rm -rf occlum_instance
mkdir occlum_instance
cd occlum_instance
occlum init
if [ $? -ne 0 ]
then
echo "occlum init failed"
exit 1
fi
rm -rf image && \
copy_bom -f ../../grpc_client.yaml --root image --include-dir /opt/occlum/etc/template && \
occlum build
if [ $? -ne 0 ]
then
echo "occlum build failed"
exit 1
fi
occlum run /bin/greeter_client