Commit ff76b462 by nhynes Committed by Tianqi Chen

Add SGX to docker (#1822)

parent 88d2a281
...@@ -22,3 +22,7 @@ RUN bash /install/ubuntu_install_redis.sh ...@@ -22,3 +22,7 @@ RUN bash /install/ubuntu_install_redis.sh
# Golang environment # Golang environment
COPY install/ubuntu_install_golang.sh /install/ubuntu_install_golang.sh COPY install/ubuntu_install_golang.sh /install/ubuntu_install_golang.sh
RUN bash /install/ubuntu_install_golang.sh RUN bash /install/ubuntu_install_golang.sh
# SGX deps
COPY install/ubuntu_install_sgx.sh /install/ubuntu_install_sgx.sh
RUN bash /install/ubuntu_install_sgx.sh
...@@ -6,6 +6,8 @@ echo set\(USE_RPC ON\) >> config.cmake ...@@ -6,6 +6,8 @@ echo set\(USE_RPC ON\) >> config.cmake
echo set\(USE_SORT ON\) >> config.cmake echo set\(USE_SORT ON\) >> config.cmake
echo set\(USE_GRAPH_RUNTIME ON\) >> config.cmake echo set\(USE_GRAPH_RUNTIME ON\) >> config.cmake
echo set\(USE_BLAS openblas\) >> config.cmake echo set\(USE_BLAS openblas\) >> config.cmake
echo set\(USE_SGX /opt/sgxsdk\) >> config.cmake
echo set\(RUST_SGX_SDK /opt/rust-sgx-sdk\) >> config.cmake
mkdir -p build mkdir -p build
cd build cd build
cmake .. cmake ..
......
apt-get update -qq && apt-get install -qq \
# for SGX SDK
build-essential git cmake \
wget python pkg-config software-properties-common \
autoconf automake libtool ocaml ocamlbuild \
# for SGX PSW
libssl-dev libcurl4-openssl-dev
git clone https://github.com/intel/linux-sgx.git
cd linux-sgx
git checkout sgx_2.2
curl 'https://gist.github.com/nhynes/c770b0e91610f8c020a8d1a803a1e7cb' | git am
./download_prebuilt.sh
make -j sdk && make -j sdk_install_pkg
./linux/installer/bin/sgx_linux_x64_sdk_2.2.100.45311.bin --prefix /opt
cd -
git clone https://github.com/baidu/rust-sgx-sdk.git /opt/rust-sgx-sdk
cd /opt/rust-sgx-sdk
git checkout bdd75ca05f66d1f5df637182ec335970f769b03a
cd -
curl -sSo rustup.sh 'https://sh.rustup.rs'
# rustc nightly-2018-08-25 is the version supported by the above version of rust-sgx-sdk
bash rustup.sh -y --no-modify-path --default-toolchain nightly-2018-08-25
rustup component add rust-src
cargo install rustfmt-nightly --force
cargo install xargo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment