Skip to content

Instantly share code, notes, and snippets.

@korakot
Last active September 3, 2024 17:37
Show Gist options
  • Save korakot/ae95315ea6a3a3b33ee26203998a59a3 to your computer and use it in GitHub Desktop.
Save korakot/ae95315ea6a3a3b33ee26203998a59a3 to your computer and use it in GitHub Desktop.
Install rust, cargo in Colab
# run this once, then reload, and then skip this
!apt install rustc
!gdown --id 1PULtTc-2e9z4bswh_SQqL5oy_4JpfV7c
!chmod +x evcxr_jupyter
!./evcxr_jupyter --install
// install dependency
:dep cmd_lib
use cmd_lib::run_cmd as sh;
# just to use with python
!apt install rustc
%env USER=korakot
@wiseaidev
Copy link

Many thanks to @mateusvmv efforts and friends here in this discussion. I put together a bash script that overwrites the current kernel and spins up a new Rust kernel without manual config:

# This script sets up and spins up a Jupyter Notebook environment with a Rust kernel using Nix and IPC Proxy. 
!wget -qO- https://gist.github.com/wiseaidev/2af6bef753d48565d11bcd478728c979/archive/3f6df40db09f3517ade41997b541b81f0976c12e.tar.gz | tar xvz --strip-components=1
!bash setup_evcxr_kernel.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment