Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload/install #427

Open
pwaller opened this issue Feb 8, 2023 · 3 comments
Open

Hot reload/install #427

pwaller opened this issue Feb 8, 2023 · 3 comments
Assignees

Comments

@pwaller
Copy link

pwaller commented Feb 8, 2023

At the moment while getting started on a project I'm finding I'm frequently missing a package I wish I had installed.

I have built up lots of state in jupyter and don't want to kill my kernel (or I have some very long running jobs I want to leave running).

How do I add something to my kernel.python.*.extraPackages and rebuild the environment, but keep my kernel? Is such a thing possible, or am I forced to quit the kernel and come back in? In the "pre nix" world I would pip instal something and then immediately import it but I'm guessing I can't quite do that here.

@djacu
Copy link
Contributor

djacu commented Feb 13, 2023

Hey @pwaller
I don't think such a thing is possible. When the kernel is created, it is given a unique path in the Nix store. When a package is add/removed/modified, a new path is created. This is necessary for reproducibility.

@GTrunSec
Copy link
Collaborator

GTrunSec commented Feb 13, 2023

if you want I can add an option of impure in the module to enable the mutable environment. I used to enable that option to debug a kernel or source of the kernel.

The following is the solution:

  1. wrap the ~/.local/jupyter/kernels to jupyter path
  2. run syncKernels to ~/local/jupyer/<name-impure> https://github.com/GTrunSec/DeSci/blob/main/nix/kernels/entrypoints/default.nix#L13
  3. then reload that name of kernel

@GTrunSec
Copy link
Collaborator

GTrunSec commented Oct 3, 2023

This request will be solved in the refactor-stage2.

@GTrunSec GTrunSec self-assigned this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants