1
Fork 0

Add basic jupyter config

This commit is contained in:
prescientmoon 2024-05-21 01:49:20 +02:00
parent 2caf4884db
commit 118baa7be3
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
4 changed files with 49 additions and 0 deletions

View file

@ -23,3 +23,4 @@ The idea is to always use consecutive ports, but never go back and try to recycl
| 8417 | [qbittorrent](../hosts/nixos/lapetus/services/qbittorrent.nix) |
| 8418 | [microbin](../hosts/nixos/lapetus/services/microbin.nix) |
| 8419 | [forgejo](../hosts/nixos/lapetus/services/forgejo.nix) |
| 8420 | [jupyterjub](../hosts/nixos/lapetus/services/jupyter.nix) |

View file

@ -24,6 +24,7 @@
./services/qbittorrent.nix
./services/microbin.nix
./services/forgejo.nix
./services/jupyter.nix
# ./services/ddclient.nix
./filesystems
./hardware

View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }: {
services.nginx.virtualHosts."jupyter.moonythm.dev" =
config.satellite.proxy
config.services.jupyterhub.port
{ proxyWebsockets = true; };
services.jupyterhub = {
enable = true;
port = 8420;
extraConfig = ''
c.Authenticator.allowed_users = {'prescientmoon'}
c.Authenticator.admin_users = {'prescientmoon'}
c.SystemdSpawner.mem_limit = '2G'
c.SystemdSpawner.cpu_limit = 2.0
'';
# {{{ Python 3 kernel
kernels.python3 =
let env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
ipykernel
pandas
scikit-learn
]));
in
{
displayName = "Python 3 for machine learning";
argv = [
"${env.interpreter}"
"-m"
"ipykernel_launcher"
"-f"
"{connection_file}"
];
language = "python";
logo32 = "${env}/${env.sitePackages}/ipykernel/resources/logo-32x32.png";
logo64 = "${env}/${env.sitePackages}/ipykernel/resources/logo-64x64.png";
};
# }}}
};
environment.persistence."/persist/state".directories = [
"/var/lib/${config.services.jupyterhub.stateDirectory}"
];
}

View file

@ -19,6 +19,7 @@ git IN CNAME lapetus
grafana IN CNAME lapetus
intray IN CNAME lapetus
irc IN CNAME lapetus
jupyter IN CNAME lapetus
lab IN CNAME lapetus
lapetus.syncthing IN CNAME lapetus ; TODO: might change this to syncthing.lapetus
media IN CNAME lapetus