update rust install

This commit is contained in:
2024-05-25 19:55:39 +08:00
parent e8f862a2bc
commit d2f5cf5ae5

View File

@@ -151,11 +151,24 @@ mamba activate mojo && modular install mojo
mamba run -n mojo python -m ipykernel install --user --name="mojo" --display-name="mojo_env" mamba run -n mojo python -m ipykernel install --user --name="mojo" --display-name="mojo_env"
EOT EOT
# Install Rust # Install Rust https://rsproxy.cn/#getStarted
ENV RUSTUP_DIST_SERVER="https://rsproxy.cn"
ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
ENV PATH="/home/${CREATE_USER}/.cargo/bin:$PATH" ENV PATH="/home/${CREATE_USER}/.cargo/bin:$PATH"
ENV CARGO_UNSTABLE_SPARSE_REGISTRY="true"
RUN <<EOT RUN <<EOT
#!/bin/bash #!/bin/bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y
echo '[source.crates-io]
replace-with = "rsproxy-sparse"
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true' >> ~/.cargo/config.toml
source $HOME/.cargo/env source $HOME/.cargo/env
cargo install evcxr_jupyter cargo install evcxr_jupyter
evcxr_jupyter --install evcxr_jupyter --install