!XDgUwBDoeNFiLcnLgQ:nixos.org

Nix Jupyter

18 Members
Goal is to discuss and document nix code to run multikernel jupyter frontends4 Servers

Load older messages


SenderMessageTime
4 Jan 2024
@admin:nixos.org@admin:nixos.orgchanged room power levels.23:48:33
@admin:nixos.org@admin:nixos.orgchanged room power levels.23:48:36
Room Avatar Renderer.23:49:05
@mjolnir:nixos.orgNixOS Moderation Bot joined the room.23:49:30
@admin:nixos.org@admin:nixos.orgchanged room power levels.23:49:40
5 Jan 2024
@keiichi:matrix.orgteto joined the room.00:24:09
@keiichi:matrix.orgteto invited @thomasjm-575b47bcc2f0db084a1d415f:gitter.imthomasjm (Tom McLaughlin).00:24:29
@keiichi:matrix.orgteto invited @natsukium:matrix.orgnatsukium.00:24:37
@admin:nixos.org@admin:nixos.org left the room.00:24:40
@keiichi:matrix.orgteto invited @gtrunsec:matrix.orgguangtao.00:26:13
@keiichi:matrix.orgteto set the room topic to "Goal is to discuss and document nix code to run multikernel jupyter frontends".00:27:06
@gtrunsec:matrix.orgguangtao joined the room.00:32:30
@ss:someonex.netSomeoneSerge (UTC+3) joined the room.02:26:48
@0x4a6f:matrix.org[0x4A6F] joined the room.12:46:59
6 Jan 2024
@thomasjm:matrix.orgthomasjm joined the room.01:04:05
@thomasjm:matrix.orgthomasjmhi all! maybe we can start here by continuing the conversation from https://github.com/NixOS/nixpkgs/pull/278315 ?01:06:21
@natsukium:matrix.orgnatsukium joined the room.01:52:05
@natsukium:matrix.orgnatsukiumI don't have an opinion on PR yet, but as far as teto is concerned, I feel that the existing unfamiliar structure and terminology is a burden.05:51:31
@gtrunsec:matrix.orgguangtao

how about

{
  jupyterLib.mkKernels = {
    python = {
      # the env should be a individual python env
      env = pkgs.python3.withPackages [ ];
      # if env == {}, then env = pkgs.python3.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:21:04
@gtrunsec:matrix.orgguangtao"It's particularly important to ensure that the env (env = (python3.withPackages (ps: with ps; [ ipykernel ]));) can be overridden, and actually, it should be easy to integrate with other 3rdSupport (poetry2nix, dream2nix, etc.)06:24:09
@gtrunsec:matrix.orgguangtao * "It's particularly important to ensure that the env (env = (python3.withPackages (ps: with ps; \[ ipykernel \]));) can be overridden, and actually, it should be easy to integrate with other 3rdSupport (poetry2nix, dream2nix, etc.) 06:24:19
@gtrunsec:matrix.orgguangtao * "It's particularly important to ensure that the env (env = (python3.withPackages (ps: with ps; \[ ipykernel \]));) can be overridden, and actually, it would be easy to integrate with other 3rdSupport (poetry2nix, dream2nix, etc.) 06:24:56
@gtrunsec:matrix.orgguangtao 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 06:30:58
@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 [ ] ++ [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:34:51
@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.orgthomasjm
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.orgthomasjm
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

Show newer messages


Back to Room ListRoom Version: 10