27 May 2021 |
jbedo | thanks 😁 | 05:34:22 |
| hax404 joined the room. | 22:53:47 |
30 May 2021 |
| cdepillabout joined the room. | 02:56:48 |
| SomeoneSerge (UTC+U[-12,12]) joined the room. | 20:49:38 |
| SomeoneSerge (UTC+U[-12,12]) changed their display name from ss to Someone S. | 20:49:53 |
| SomeoneSerge (UTC+U[-12,12]) set a profile picture. | 21:13:21 |
SomeoneSerge (UTC+U[-12,12]) | Hey there! Hope this eventually works out to replace slack | 21:21:55 |
jbedo | it's definitely my preference | 23:51:37 |
31 May 2021 |
| [0x4A6F] changed their display name from [0x4A6F] to 0x4A6F. | 08:23:36 |
1 Jun 2021 |
| [0x4A6F] changed their display name from 0x4A6F to [0x4A6F]. | 06:35:13 |
| Merlin Göttlinger joined the room. | 10:11:30 |
| Merlin Göttlinger left the room. | 10:12:04 |
| adisbladis joined the room. | 18:54:14 |
3 Jun 2021 |
| evax joined the room. | 09:53:45 |
| Rémy Grünblatt joined the room. | 15:17:48 |
5 Jun 2021 |
| lunik1 joined the room. | 00:50:16 |
6 Jun 2021 |
| Edmund joined the room. | 21:49:56 |
8 Jun 2021 |
| Jez (he/him) 🌦️ changed their profile picture. | 08:51:12 |
| Jez (he/him) 🌦️ changed their profile picture. | 09:41:33 |
10 Jun 2021 |
| Church joined the room. | 04:29:57 |
11 Jun 2021 |
| Manuel Bärenz joined the room. | 10:11:13 |
18 Jun 2021 |
evax | Hi, I'm trying to use dockerTools and jupyterWith to build an image to use in a jupyterhub instance in kubernetes | 11:15:21 |
evax | most of it is working except for the terminal - I can't figure out a way to give access to python/ipython with all the selected packages from the terminal | 11:16:46 |
evax | it looks like jupyterWith/jupyterlab come with a default python kernel with a limited package set, and that's what's exposed in the terminal | 11:18:59 |
Domen Kožar | evax: in order to have higher chances of getting help, I'd suggest attaching a file that demonstrates how to reproduce the problem | 14:49:44 |
19 Jun 2021 |
evax | Download jupyterlab.nix | 10:42:04 |
evax | Domen Kožar: here's an example. You can create a notebook with the "test" environment, and import pandas, but if you open a terminal and run python/ipython, pandas isn't available | 10:43:02 |
evax | jupyter = builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
rev = "0940c0d8ff3dbbae8395c138a89a57fd2cdb509c";
};
overlays = [
(import "${jupyter}/nix/python-overlay.nix")
(import "${jupyter}/nix/overlay.nix")
];
pkgs = import (builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/bad3ccd099ebe9a8aa017bda8500ab02787d90aa.tar.gz";
sha256 = "07ik6rcfpcvj2zch3mzkxwxjs817iysbvsydkm85f14kn7gnyzp5";
}) {
system = "x86_64-linux";
inherit overlays;
};
pythonPackages = ps: with ps; [
numpy pandas
];
python38 = pkgs.python38.withPackages pythonPackages;
userEnv = pkgs.symlinkJoin rec {
name = "user-environment";
buildInputs = with pkgs; [
python38
bashInteractive
coreutils
findutils
];
paths = buildInputs;
};
iPython = pkgs.jupyterWith.kernels.iPythonWith {
name = "test";
python3 = python38;
packages = pythonPackages;
};
jupyterlab = pkgs.jupyterWith.jupyterlabWith {
kernels = [ iPython ];
extraPackages = _: [ userEnv ];
};
nbUser = "jovyan";
imageEtc = pkgs.runCommand "image-etc" {} ''
mkdir -p $out/etc/pam.d
echo "root:x:0:0::/root:/bin/sh" > $out/etc/passwd
echo "${nbUser}:x:1000:1000::/home/${nbUser}:${userEnv}/bin/bash" >> $out/etc/passwd
echo "root:!x:::::::" > $out/etc/shadow
echo "${nbUser}:!:::::::" >> $out/etc/shadow
echo "root:x:0:" > $out/etc/group
echo "${nbUser}:x:1000:" >> $out/etc/group
echo "root:x::" > $out/etc/gshadow
echo "${nbUser}:!::" >> $out/etc/gshadow
'';
startNotebook = pkgs.writers.writeBash "start-notebook.sh" ''
/bin/jupyter-lab --ip=0.0.0.0 --no-browser
'';
in
pkgs.dockerTools.buildImage {
name = "jupyter";
tag = "v0.0.1";
contents = [
imageEtc
userEnv
jupyterlab
pkgs.cacert
pkgs.iana-etc
pkgs.glibcLocales
pkgs.bashInteractive
pkgs.coreutils
pkgs.neovim
pkgs.htop
];
config = {
Env = [
"LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive"
"LANG=en_US.UTF-8"
"LANGUAGE=en_US:en"
"LC_ALL=en_US.UTF-8"
"HOME=/home/${nbUser}"
"SHELL=${userEnv}/bin/bash"
];
ENTRYPOINT = [ "${pkgs.tini}/bin/tini" "-g" "--" ];
CMD = [ "${startNotebook}" ];
WorkingDir = "/home/${nbUser}";
ExposedPorts = {
"8888" = {};
};
User = nbUser;
};
extraCommands = ''
mkdir -m 1777 ./tmp
mkdir -m 777 -p ./home/${nbUser}
'';
}
| 10:44:39 |
evax | * let
jupyter = builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
rev = "0940c0d8ff3dbbae8395c138a89a57fd2cdb509c";
};
overlays = [
(import "${jupyter}/nix/python-overlay.nix")
(import "${jupyter}/nix/overlay.nix")
];
pkgs = import (builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/bad3ccd099ebe9a8aa017bda8500ab02787d90aa.tar.gz";
sha256 = "07ik6rcfpcvj2zch3mzkxwxjs817iysbvsydkm85f14kn7gnyzp5";
}) {
system = "x86_64-linux";
inherit overlays;
};
pythonPackages = ps: with ps; [
numpy pandas
];
python38 = pkgs.python38.withPackages pythonPackages;
userEnv = pkgs.symlinkJoin rec {
name = "user-environment";
buildInputs = with pkgs; [
python38
bashInteractive
coreutils
findutils
];
paths = buildInputs;
};
iPython = pkgs.jupyterWith.kernels.iPythonWith {
name = "test";
python3 = python38;
packages = pythonPackages;
};
jupyterlab = pkgs.jupyterWith.jupyterlabWith {
kernels = [ iPython ];
extraPackages = _: [ userEnv ];
};
nbUser = "jovyan";
imageEtc = pkgs.runCommand "image-etc" {} ''
mkdir -p $out/etc/pam.d
echo "root:x:0:0::/root:/bin/sh" > $out/etc/passwd
echo "${nbUser}:x:1000:1000::/home/${nbUser}:${userEnv}/bin/bash" >> $out/etc/passwd
echo "root:!x:::::::" > $out/etc/shadow
echo "${nbUser}:!:::::::" >> $out/etc/shadow
echo "root:x:0:" > $out/etc/group
echo "${nbUser}:x:1000:" >> $out/etc/group
echo "root:x::" > $out/etc/gshadow
echo "${nbUser}:!::" >> $out/etc/gshadow
'';
startNotebook = pkgs.writers.writeBash "start-notebook.sh" ''
/bin/jupyter-lab --ip=0.0.0.0 --no-browser
'';
in
pkgs.dockerTools.buildImage {
name = "jupyter";
tag = "v0.0.1";
contents = [
imageEtc
userEnv
jupyterlab
pkgs.cacert
pkgs.iana-etc
pkgs.glibcLocales
pkgs.bashInteractive
pkgs.coreutils
pkgs.neovim
pkgs.htop
];
config = {
Env = [
"LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive"
"LANG=en_US.UTF-8"
"LANGUAGE=en_US:en"
"LC_ALL=en_US.UTF-8"
"HOME=/home/${nbUser}"
"SHELL=${userEnv}/bin/bash"
];
ENTRYPOINT = [ "${pkgs.tini}/bin/tini" "-g" "--" ];
CMD = [ "${startNotebook}" ];
WorkingDir = "/home/${nbUser}";
ExposedPorts = {
"8888" = {};
};
User = nbUser;
};
extraCommands = ''
mkdir -m 1777 ./tmp
mkdir -m 777 -p ./home/${nbUser}
'';
}
| 10:46:50 |
evax |
| 10:52:10 |