Skip to content

da-tubi/jupyterlab-best-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launching Jupyter Labs in an easy way

For a much more simplified version of this repo, see jupyter-notebook-best-practice.

Usage

# Default Resolve
bin/lab

bin/lab duckdb
bin/lab http

How to define a Jupyter Lab

Three Highlights

  • Free yourself of Python virtual environment
  • Reproducible because of the dependencies lock mechanism
  • As Easy as bin/lab xyz to launch a JupyterLab

Take duckdb for example

jupyter_lab(name="duckdb", requirements=["duckdb==0.5.1"])
  • notebooks/duckdb is where we store the notebooks
  • resolve duckdb is defined as duckdb = "3rdparty/python/duckdb.lock" in pants.toml
  • run ./pants generate-lockfiles --resolve=duckdb to generate the lockfiles for dependencies

Name and Requirements

Name is used to:

  • Locate where we store the notebooks: notebooks/{name}
  • Set dependencies as the resolve name

The Jupyter Lab default is special, we kept all notebooks for default under notebooks.

Requirements are equiv to requirements.txt but we maintain it in a list here.

Everytime, we change the requirements, do not forget to run ./pants generate-lockfiles --resolve={name}.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published