Add basic jupyter config
This commit is contained in:
parent
2caf4884db
commit
118baa7be3
|
@ -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) |
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
./services/qbittorrent.nix
|
||||
./services/microbin.nix
|
||||
./services/forgejo.nix
|
||||
./services/jupyter.nix
|
||||
# ./services/ddclient.nix
|
||||
./filesystems
|
||||
./hardware
|
||||
|
|
46
hosts/nixos/lapetus/services/jupyter.nix
Normal file
46
hosts/nixos/lapetus/services/jupyter.nix
Normal 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}"
|
||||
];
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue