Running Rust Kernel in Deepnote

The Mythical Engineer


deepnote-rust-banner

If you need to work with a language other than Python, the Jupyter ecosystem offers a wide range of other kernels. Deepnote supports a lot of them!

Deepnote Official documentation has instructions on setting up R, Julia, Bash, Scala and Ruby.

I tried to set up a Rust kernel and it works well in Deepnote. You can use the provided custom Dockerfile in your environment and you can run rust in Deepnote.

Dockerfile for Rust Kernel

FROM deepnote/python:3.10
RUN apt-get update -y
RUN curl https://sh.rustup.rs -sSf > install_rust.sh
RUN bash install_rust.sh -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo --help
RUN cargo install evcxr_jupyter
RUN rustup component add rust-src
RUN pip install jupyter-console
RUN evcxr_jupyter --install
RUN jupyter kernelspec list
RUN jupyter console --kernel rust
ENV DEFAULT_KERNEL_NAME "rust"

After the completion of the build, you can execute Rust in the deepnote notebook.

Rust Example

It’s a little rusty right now as it throws a SIGKILL error sometimes.

Error: Subprocess terminated with status: signal: 9 (SIGKILL)

Rust SIGKILL Error

You can check out my older blog post explaining use of C++ and Javascript Kernel in Deepnote.


#development  #jupyter  #docker  #deepnote  #rust 

Suggested Reading

  • * How to install Cursor AI IDE on Fedora Asahi Linux Arm64

    * Revert a commited secret from remote repository

    * From Chaos to Control: Using Direnv to Manage Multiple GitHub Accounts

    * How Postgres Triggers Can Simplify Your Backend Development

    * List of most used Key-Value stores and databases

  • Share this: