|
5 | 5 | "id": "f4e8c1d9-c986-44cf-96cf-52328f5af66d",
|
6 | 6 | "metadata": {},
|
7 | 7 | "source": [
|
8 |
| - "## Google Colab & Binder Rust Setup\n", |
| 8 | + "## Google Colab Rust Setup\n", |
9 | 9 | "\n",
|
10 |
| - "The following cell is used to set up a Rust environment on Colab and Binder. Don't execute it locally!\n", |
| 10 | + "The following cell is used to set up a Rust environment on Colab. Don't execute it locally!\n", |
11 | 11 | "\n",
|
12 | 12 | "Many thanks to [`mateusvmv`](https://github.com/mateusvmv) for this hack in [`gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3`](https://gist.github.com/korakot/ae95315ea6a3a3b33ee26203998a59a3?permalink_comment_id=4715636#gistcomment-4715636)."
|
13 | 13 | ]
|
|
19 | 19 | "metadata": {},
|
20 | 20 | "outputs": [],
|
21 | 21 | "source": [
|
22 |
| - "!rm -rf /root/.local/share/jupyter/kernels\n", |
23 |
| - "\n", |
24 |
| - "# Nix install\n", |
25 |
| - "!curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm\n", |
26 |
| - "!ln -s /root/.nix-profile/bin /opt/bin\n", |
27 |
| - "\n", |
28 |
| - "# Install evcxr\n", |
29 |
| - "!nix-env -f '<nixpkgs>' -iA cargo rustc evcxr sccache\n", |
30 |
| - "!evcxr_jupyter --install\n", |
31 |
| - "\n", |
32 |
| - "# Configure evcxr\n", |
33 |
| - "!mkdir -p /root/.config/evcxr\n", |
34 |
| - "!printf \":timing\\n:sccache 1\" > /root/.config/evcxr/init.evcxr\n", |
35 |
| - "\n", |
36 |
| - "# IPC Proxy (https://stackoverflow.com/a/74821762)\n", |
37 |
| - "!wget -qO- https://gist.github.com/SpencerPark/e2732061ad19c1afa4a33a58cb8f18a9/archive/b6cff2bf09b6832344e576ea1e4731f0fb3df10c.tar.gz | tar xvz --strip-components=1\n", |
38 |
| - "!python install_ipc_proxy_kernel.py --quiet --kernel=rust --implementation=ipc_proxy_kernel.py > /dev/null\n", |
39 |
| - "\n", |
40 |
| - "# To avoid confusion between kernel names\n", |
41 |
| - "!sed -i 's/\"display_name\": \"Rust\"/\"display_name\": \"Rust-TCP\"/g' /root/.local/share/jupyter/kernels/rust_tcp/kernel.json" |
| 22 | + "# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. \n", |
| 23 | + "!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1\n", |
| 24 | + "!bash setup_evcxr_kernel.sh" |
42 | 25 | ]
|
43 | 26 | },
|
44 | 27 | {
|
|
0 commit comments