Skip to content

Instantly share code, notes, and snippets.

Last active February 20, 2023 14:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save erikbern/6d3ed976917977f9b62c1aeb37628a2a to your computer and use it in GitHub Desktop.
Run Notebook inside Modal
# Note: this assumes you have a notebook locally named my_notebook.ipynb
import modal
stub = modal.Stub(
image=modal.DebianSlim().pip_install(["papermill", "ipykernel"]),
mounts=[modal.Mount(local_file="my_notebook.ipynb", remote_dir="/root")],
def run():
import papermill
if __name__ == "__main__":
Copy link

DStaz commented Feb 19, 2023

Hi, could you write an updated working examples of a notebook used into modal please ?

Copy link

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