Commit 90159022 by nhynes Committed by Tianqi Chen

Install rust for all users (#1856)

parent f1d815cc
...@@ -26,6 +26,8 @@ RUN bash /install/ubuntu_install_golang.sh ...@@ -26,6 +26,8 @@ RUN bash /install/ubuntu_install_golang.sh
# Rust env # Rust env
COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
RUN bash /install/ubuntu_install_rust.sh RUN bash /install/ubuntu_install_rust.sh
ENV RUSTUP_HOME /opt/rust
ENV CARGO_HOME /opt/rust
# SGX deps # SGX deps
COPY install/ubuntu_install_sgx.sh /install/ubuntu_install_sgx.sh COPY install/ubuntu_install_sgx.sh /install/ubuntu_install_sgx.sh
...@@ -33,4 +35,4 @@ RUN bash /install/ubuntu_install_sgx.sh ...@@ -33,4 +35,4 @@ RUN bash /install/ubuntu_install_sgx.sh
ENV LD_LIBRARY_PATH /opt/sgxsdk/lib64:${LD_LIBRARY_PATH} ENV LD_LIBRARY_PATH /opt/sgxsdk/lib64:${LD_LIBRARY_PATH}
ENV PATH $PATH:/root/.cargo/bin:/usr/lib/go-1.10/bin ENV PATH $PATH:$CARGO_HOME/bin:/usr/lib/go-1.10/bin
apt-get update && apt-get install -y --no-install-recommends --force-yes curl apt-get update && apt-get install -y --no-install-recommends --force-yes curl
curl -sSo rustup.sh 'https://sh.rustup.rs' export RUSTUP_HOME=/opt/rust
# rustc nightly-2018-08-25 is the version supported by the above version of rust-sgx-sdk export CARGO_HOME=/opt/rust
bash rustup.sh -y --no-modify-path --default-toolchain nightly-2018-08-25 # rustc nightly-2018-08-25 is the version supported by the rust-sgx-sdk
. $HOME/.cargo/env curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain nightly-2018-08-25
. $CARGO_HOME/env
rustup toolchain add nightly rustup toolchain add nightly
rustup component add rust-src rustup component add rust-src
cargo +nightly install rustfmt-nightly --version 0.99.5 --force cargo +nightly install rustfmt-nightly --version 0.99.5 --force
cargo +nightly install xargo cargo +nightly install xargo
# make rust usable by all users
chmod a+w /opt/rust
sudo find /opt/rust -type d -exec chmod a+w {} \;
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