!XDgUwBDoeNFiLcnLgQ:nixos.org

Nix Jupyter

25 Members
Goal is to discuss and document nix code to run multikernel jupyter frontends6 Servers

Load older messages


SenderMessageTime
6 Jan 2024
@gtrunsec:matrix.orgguangtao *

how about

{
  jupyterLib.mkKernels = {
    python = {
      # the env should be an individual python env
      env = pkgs.python3.withPackages [ ];
      # if env == {}, then env = pkgs.python3.withPackages (ps: ps withPackages) ++ [python.pkgs.ipykernel]);
      withPackages = [];
      override = {
        ...
      };
    };
    haskell = {
      # env = pkgs.haskellPackages.ghcWithPackages (p: with p; [ ihaskell ]);
      # if env == {}, then env = pkgs.haskellPackages.ghcWithPackages (p: with p; [ ihaskell ]) ++ ghcWithPackages p);
      ghcWithPackages = p: [ p.ihaskell ];
      override = {
        display_name = "Custom Haskell";
      };
    };
    ...
  };
}

06:35:34
7 Jan 2024
@p14:matrix.orgp14 joined the room.10:25:42
@p14:matrix.orgp14g'day. I just started trying to use jupyter-notebook, but discovered that in nixos somewhere between nixpkgs/690e58e11de69953a1e76d0b9cc5f8caee63badd and present, keyboard navigation of cells in command mode is broken. (Up/down arrow, j/k should move up/down cells but nothing happens). I've been trying to isolate the issue: if I take a recent nixpkgs commit and inject old jupyter-notebook, that breaks it, so it's not jupyter/notebook versions that's causing the breakage but presumably some other package or incompatibilities between them. Therefore I suspect this is not a jupyter bug but a nixpkgs bug. Any thoughts?10:28:04
8 Jan 2024
@ss:someonex.netSomeoneSerge (utc+3) changed their display name from SomeoneSerge (UTC+2) to SomeoneSerge (hash-versioned python modules when).04:50:11
10 Jan 2024
@thomasjm:matrix.org@thomasjm:matrix.org
In reply to @p14:matrix.org
g'day. I just started trying to use jupyter-notebook, but discovered that in nixos somewhere between nixpkgs/690e58e11de69953a1e76d0b9cc5f8caee63badd and present, keyboard navigation of cells in command mode is broken. (Up/down arrow, j/k should move up/down cells but nothing happens).

I've been trying to isolate the issue: if I take a recent nixpkgs commit and inject old jupyter-notebook, that breaks it, so it's not jupyter/notebook versions that's causing the breakage but presumably some other package or incompatibilities between them. Therefore I suspect this is not a jupyter bug but a nixpkgs bug. Any thoughts?
your diagnosis sounds right. could you file a Nixpkgs issue and tag the Jupyter team?
23:55:37
@thomasjm:matrix.org@thomasjm:matrix.org
In reply to @gtrunsec:matrix.org
I don't mind rewriting a more powerful jupyenv as a new project, but I hope the current nixpkgs.jupyter can exist as much as possible as a library. If there's a plan for that project, then I would just need to focus on the integration of the data-science env and other Nix ecosystems

this sounds like a potentially larger scope than what i had in mind.

i thought we were just trying to solve the problem of "user wants to spin up Jupyterlab/notebook/console with some set of kernels." AFAICT this is roughly what jupyenv is for too. i gather you want to be able to do things like override the Python environment with one derived from poetry2nix. i think we can probably support this without too much trouble, just by making sure that the components that go into each kernel are easy to override.

if there's more to this then maybe a design doc is called for.

23:58:37
11 Jan 2024
@gtrunsec:matrix.orgguangtao

i think we can probably support this without too much trouble, just by making sure that the components that go into each kernel are easy to override.

right, as I mentioned earlier. For me, it is sufficient to override each kernel individually and incorporate most of the kernel packages into the nixpkgs for the maintenance aspect. As for other tasks, I wii have a plan to develop a more robust jupyenv to fulfill those requirements.

06:31:00
@gtrunsec:matrix.orgguangtao *

i think we can probably support this without too much trouble, just by making sure that the components that go into each kernel are easy to override.

right, as I mentioned earlier. For me, it is sufficient to override each kernel individually and incorporate most of the kernel packages(ocaml/js,psql,zsh, etc) into the nixpkgs for the maintenance aspect. As for other tasks, I wii have a plan to develop a more robust jupyenv to fulfill those requirements.

06:31:29
@gtrunsec:matrix.orgguangtao *

i think we can probably support this without too much trouble, just by making sure that the components that go into each kernel are easy to override.

right, as I mentioned earlier. For me, it is sufficient to override each kernel individually and incorporate most of the kernels package(ocaml/js,psql,zsh, etc) into the nixpkgs for the maintenance aspect. As for other tasks, I wii have a plan to develop a more robust jupyenv to fulfill those requirements.

06:31:38
12 Jan 2024
@natsukium:matrix.orgnatsukium
In reply to @p14:matrix.org
g'day. I just started trying to use jupyter-notebook, but discovered that in nixos somewhere between nixpkgs/690e58e11de69953a1e76d0b9cc5f8caee63badd and present, keyboard navigation of cells in command mode is broken. (Up/down arrow, j/k should move up/down cells but nothing happens).

I've been trying to isolate the issue: if I take a recent nixpkgs commit and inject old jupyter-notebook, that breaks it, so it's not jupyter/notebook versions that's causing the breakage but presumably some other package or incompatibilities between them. Therefore I suspect this is not a jupyter bug but a nixpkgs bug. Any thoughts?

I'm still not sure what's causing the problem. git bisect says this commit caused it.

first bad commit: [39bd27fd2e71dbcf87efdb675500496fa3cd2633] python311Packages.jupyterlab: 4.0.6 -> 4.0.9

06:01:23
@natsukium:matrix.orgnatsukium
In reply to @p14:matrix.org
g'day. I just started trying to use jupyter-notebook, but discovered that in nixos somewhere between nixpkgs/690e58e11de69953a1e76d0b9cc5f8caee63badd and present, keyboard navigation of cells in command mode is broken. (Up/down arrow, j/k should move up/down cells but nothing happens).

I've been trying to isolate the issue: if I take a recent nixpkgs commit and inject old jupyter-notebook, that breaks it, so it's not jupyter/notebook versions that's causing the breakage but presumably some other package or incompatibilities between them. Therefore I suspect this is not a jupyter bug but a nixpkgs bug. Any thoughts?
*

I'm still not sure what's causing the problem. git bisect says this commit caused it.

first bad commit: [39bd27fd2e71dbcf87efdb675500496fa3cd2633] python311Packages.jupyterlab: 4.0.6 -> 4.0.9

06:01:35
@natsukium:matrix.orgnatsukiumI looked into this issue and could only find that something in the jupyterlab 4.0.6 -> 4.0.7 broke the nixpkgs notebook shortcut(Up/Down). I can't see the same regression in jupyterlab or nbclassic. But I'm not interested in pursuing this issue any further. I tried the pre-release jupyterlab 4.1.0b0 on Ubuntu and macOS, but this version does not provide such shortcuts at all.08:59:37
@p14:matrix.orgp14
In reply to @natsukium:matrix.org

I'm still not sure what's causing the problem. git bisect says this commit caused it.

first bad commit: [39bd27fd2e71dbcf87efdb675500496fa3cd2633] python311Packages.jupyterlab: 4.0.6 -> 4.0.9

Thanks for the bisect, I can reproduce 39bd27fd2e71dbcf87efdb675500496fa3cd2633 as the first bad commit.

I can further elaborate that the issue appears between 4.0.6 and 4.0.7. I did that by taking that bad commit and overriding the src to acquire the 4.0.7 wheel.

15:11:27
@p14:matrix.orgp14So I tried to bisect jupyterlab, but that was a bit of a waste of time because it just points at the commit where all the typescript dependencies got bumped in the package.json: https://github.com/jupyterlab/jupyterlab/commit/fa7fb591e8654ae446998a588d067841e375c542 Does anyone understand how jupyter is put together and if it's possible to properly bisect the changes to it? I assume those things do live within the github:jupyterlab/jupyterlab repo and it should be bisectable...15:42:52
@p14:matrix.orgp14Well, I was able to build specific commits of jupyterlab. And specific commits of jupyter notebook. However, I can't seem to build a specific commit of notebook whose dependency is a specific commit of jupyterlab yet.16:44:08
@p14:matrix.orgp14I don't understand how notebook picks up the javascript dependencies from jupyterlab.16:44:38
@p14:matrix.orgp14
In reply to @thomasjm:matrix.org
your diagnosis sounds right. could you file a Nixpkgs issue and tag the Jupyter team?

https://github.com/NixOS/nixpkgs/issues/280539

I tried for a couple of hours to figure out how to bisect jupyterlab-as-a-dependency-of-jupyter-notebook-in-developer-mode but didn't succeed unfortunately. Bisecting it as an ordinary dependency doesn't work because it just picks up the versions encoded in the package.json when they're eventually bumped.

17:00:26
18 Jan 2024
@fizihcyst:matrix.org@fizihcyst:matrix.org joined the room.16:58:08
24 Jan 2024
@nick4f42:matrix.orgnick4f42 joined the room.02:56:14
@keiichi:matrix.orgteto thomasjm: sry I haven't been able to answer, pretty busy start of the year. Will try to do in upcoming days 11:56:04
@thomasjm:matrix.org@thomasjm:matrix.orgno problem, take your time12:20:06
15 Feb 2024
@a-kenji:matrix.orga-kenji joined the room.19:15:15
14 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:44:27
15 Mar 2024
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels joined the room.04:06:29
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels 05:00:26
17 Mar 2024
@sankaratupi:matrix.orgFelipe Marcelino joined the room.17:58:19
19 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.00:29:53
21 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:02:50
@samasaur:matrix.orgsamasaur joined the room.22:42:27
@samasaur:matrix.orgsamasaurHas anyone had any success getting Jupyter to recognize python-lsp-server?22:43:15

Show newer messages


Back to Room ListRoom Version: 10