Multiple Jupyter Labs at once, without shared state


I’m hoping to run multiple instances of jupyter lab on the same computer, without these instances knowing of each other. I have two separate conda environments, and I’m hoping to run a jupyter lab inside each environment. However, right now, if I have one jupyter lab open, then when I try to open up a second jupyter lab, it starts kernels for all of the notebooks that I had running in the first one. I tried running with --notebook-dir set to a local directory, and in this case a bunch of messages like

[W 2021-10-25 15:00:12.377 ServerApp] No such file or directory: /path/to/notebook/

were logged, one for each notebook that I had open in the first jupyter lab instance.

So, it seems like I’m not successfully separating them with --notebook-dir. I’m having trouble finding how to separate the states of jupyter lab servers, can anyone point me to a resource?


I have found a way: I’m now launching with JUPYTERLAB_WORKSPACES_DIR=.some/path jupyter lab <args> to separate the workspaces. If there’s a better way, I’d be curious to hear :slight_smile: