Skip to content

Instantly share code, notes, and snippets.

@ianhi
Created December 11, 2020 20:06
Show Gist options
  • Save ianhi/259dd7c10757e4d372eb48f2f33c4986 to your computer and use it in GitHub Desktop.
Save ianhi/259dd7c10757e4d372eb48f2f33c4986 to your computer and use it in GitHub Desktop.
setting up jupyterlab environments
jlab-env-basic()
{
conda create -n $1 -c conda-forge python mamba -y
conda activate $1
mamba install -c conda-forge jupyterlab nodejs -y
}
jlab-env-full()
{
conda create -n $1 -c conda-forge python=3.8 mamba -y
conda activate $1
mamba install -c conda-forge jupyterlab ipympl=0.5.8 nodejs scikit-image scipy numpy -y
pip install jupyterlab-git
pip install mpl_interactions
pip install jupyterlab_code_formatter black isort
jupyter labextension install @jupyter-widgets/jupyterlab-manager @axlair/jupyterlab_vim jupyterlab_vim-system-clipboard-support @telamonian/theme-darcula --no-build
jupyter labextension install @ryantam626/jupyterlab_code_formatter --no-build
jupyter serverextension enable --py jupyterlab_code_formatter
jupyter lab build
}
@ianhi
Copy link
Author

ianhi commented Dec 11, 2020

Put those functions into your .bashrc and then you can run commands such as jlab-env-full test which will create and activate a jlab environment with all of the things that I like to have in an env.

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