Infini-DL360/jupyter: refactor to install lab extensions
This commit is contained in:
parent
8ab44e466d
commit
3bdc48c7d6
1 changed files with 41 additions and 26 deletions
|
@ -9,36 +9,23 @@ let
|
||||||
logo32 = "${env}/${env.sitePackages}/ipykernel/resources/logo-32x32.png";
|
logo32 = "${env}/${env.sitePackages}/ipykernel/resources/logo-32x32.png";
|
||||||
logo64 = "${env}/${env.sitePackages}/ipykernel/resources/logo-64x64.png";
|
logo64 = "${env}/${env.sitePackages}/ipykernel/resources/logo-64x64.png";
|
||||||
};
|
};
|
||||||
in
|
|
||||||
{
|
|
||||||
services.jupyter = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.python3Packages.jupyterlab;
|
|
||||||
|
|
||||||
# Hosted behind Tailscale, so security doesn't matter
|
jupyterEnv = pkgs.python3.withPackages (p: with p; [
|
||||||
command = "jupyter-lab --ServerApp.token='' --ServerApp.password=''";
|
jupyterlab
|
||||||
password = "''";
|
jupyterlab-lsp
|
||||||
ip = "*";
|
jupyterlab-pygments
|
||||||
|
|
||||||
user = "infinidoge";
|
# export
|
||||||
group = "users";
|
nbconvert
|
||||||
notebookDir = "~/Notebooks";
|
nbformat
|
||||||
|
|
||||||
kernels = {
|
# lsp
|
||||||
python3 = mkPythonKernel "Python 3" (pkgs.python3.withPackages (p: with p; [
|
python-lsp-server
|
||||||
ipykernel
|
python-lsp-ruff
|
||||||
nbconvert
|
]);
|
||||||
nbformat
|
|
||||||
|
|
||||||
matplotlib
|
jupyterPath = with pkgs; [
|
||||||
numpy
|
# export
|
||||||
pandas
|
|
||||||
scipy
|
|
||||||
]));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.jupyter.path = with pkgs; [
|
|
||||||
pandoc
|
pandoc
|
||||||
(texlive.combine {
|
(texlive.combine {
|
||||||
inherit (texlive)
|
inherit (texlive)
|
||||||
|
@ -54,6 +41,34 @@ in
|
||||||
;
|
;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.jupyter = {
|
||||||
|
enable = true;
|
||||||
|
package = jupyterEnv;
|
||||||
|
|
||||||
|
# Hosted behind Tailscale, so security doesn't matter
|
||||||
|
command = "jupyter-lab --ServerApp.token='' --ServerApp.password=''";
|
||||||
|
password = "''";
|
||||||
|
ip = "*";
|
||||||
|
|
||||||
|
user = "infinidoge";
|
||||||
|
group = "users";
|
||||||
|
notebookDir = "~/Notebooks";
|
||||||
|
|
||||||
|
kernels = {
|
||||||
|
python3 = mkPythonKernel "Python 3" (pkgs.python3.withPackages (p: with p; [
|
||||||
|
ipykernel
|
||||||
|
|
||||||
|
matplotlib
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
scipy
|
||||||
|
]));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.jupyter.path = jupyterPath;
|
||||||
|
|
||||||
services.nginx.virtualHosts."jupyter.internal.inx.moe" = common.nginx.ssl // {
|
services.nginx.virtualHosts."jupyter.internal.inx.moe" = common.nginx.ssl // {
|
||||||
listenAddresses = [ "100.101.102.124" ];
|
listenAddresses = [ "100.101.102.124" ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue