A containerized version of the Evcxr, an evaluation context/REPL for Rust as a Jupyter kernel.
👏welcome to use, please star this project if it's helpful for you! Thank you!
- Notebook dir :
/home/jupyter/notebooks - server port: 8888
- Login password: hgfkeep
Just pull the docker image from the Docker hub:
docker run --rm -p 8888:8888 hgfdodo/evcxr
And go to http://localhost:8888
Or build it yourself by cloning this repo:
git clone https://github.com/cheperuiz/docker-rust-jupyter
cd docker-rust-jupyter
docker build -t hgfdodo/evcxr .
⚠️ mount volume owner's user must be1000:1000。
in python jupyter, just input:
!pip install numpypython packages will install in /home/jupyter/.local/lib/python3.7/.
If we want to install package with cargo, we can also do it the same way but in python kernel, rust kernel do not allow execute system commands!
!cargo install fmtor use cargo-edit extension for non-binary dependencies.
!cargo add timecargo packages will install in /home/jupyter/.local/lib/cargo.
:dep base64 = "0.10.1"
base64::encode(&vec![1, 2, 3, 4])更多jupyter的使用场景和例子,参考:rust-jupyter-example.ipynb
- add cargo-edit support, we can
cargo add packagein jupyter notebook. - build to slim images
- add soft link of pip3
- change
CARGO_HOME=/home/jupyter/.local/lib/cargo - rust jupyter can add packages in jupyter