From d1f1291ee56424357f7032ff28eae5ffb9e2deb9 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Tue, 3 Oct 2023 01:23:45 +0200 Subject: [PATCH] Update jupyter server --- hosts/voyager/services/jupyter.nix | 41 ++++++++++++++++++++++++------ secrets/voyager/voyager.yaml | 6 ++--- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/hosts/voyager/services/jupyter.nix b/hosts/voyager/services/jupyter.nix index f94437e..b27ca94 100644 --- a/hosts/voyager/services/jupyter.nix +++ b/hosts/voyager/services/jupyter.nix @@ -18,16 +18,38 @@ in { in readFile config.sops.secrets."jupyter/password".path; + /* kernels = { */ + /* pythonDS = let */ + /* env = (pkgs.python310.withPackages (pythonPackages: with pythonPackages; [ */ + /* numpy */ + /* matplotlib */ + /* ipykernel */ + /* ])); */ + /* in { */ + /* displayName = "Python for data science"; */ + /* 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"; */ + /* }; */ + /* }; */ kernels = { - pythonDS = let + python3 = let env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ - numpy - matplotlib - scipy - ipykernel - ])); + ipykernel + pandas + numpy + scipy + scikit-learn + ])); in { - displayName = "Python for data science"; + displayName = "Python 3 for statistics"; argv = [ "${env.interpreter}" "-m" @@ -98,6 +120,9 @@ in { }; services.nginx.virtualHosts."jupyter.feal.no" = { - locations."/".proxyPass = "http://unix:/run/jupyter/jupyter.sock:/"; + locations."/" = { + proxyPass = "http://unix:/run/jupyter/jupyter.sock:/"; + proxyWebsockets = true; + }; }; } diff --git a/secrets/voyager/voyager.yaml b/secrets/voyager/voyager.yaml index 2c6595c..02b37e4 100644 --- a/secrets/voyager/voyager.yaml +++ b/secrets/voyager/voyager.yaml @@ -24,7 +24,7 @@ wireguard: vaultwarden: admintoken: ENC[AES256_GCM,data:mJDiu0tgJQmvmJcJMULmctJvPN6/uM9VaoigHOMFkve9Vd3IMrpDmyJq+ibLpul+hw4PlLARjRzOxdZVcX7AB+uOOOrypppOIfvYC6U=,iv:YcyYLEHeIsCchcEy+fOMiQi8Cgf24AwQDpL7fhogNEU=,tag:1SqpNvuPhfjYIjvvRV34/Q==,type:str] jupyter: - password: ENC[AES256_GCM,data:eTcjhRphz+2+QAPIPh/H4Dy3SK5bhUVTMkg=,iv:I+fdFG/zNqCj5Wl2H+qJb/eIfjrWmu2fUsxITBMM2N8=,tag:Vim/Fepf/Q67hjUJlXIkbg==,type:str] + password: ENC[AES256_GCM,data:MYnrNSesZn97ArnrGS6nHMnSSmDpBCk4/H6zJx1O+M8tjm2SWf25Pk1HcRzdJ5nUyPvMmoaJ0zAdptZYMiGmh2p4emaEbSOerxhEKyrFnuaS3PZRBgEUBAMQ3r0FNwUFNQ+e711t2fHD,iv:gZkwZwFJCn/oSIanNaOhpTZNG9qVvtRlO8f8KvuDR08=,tag:cXvFwQRhd24mcidMOki2Qg==,type:str] sops: kms: [] gcp_kms: [] @@ -58,8 +58,8 @@ sops: NENEM2VLRDBzTWM0ckdPVThaeE0xL2MKTAvsDKgaoj0Fz9CoNbP6s1kROlDbbXtB 4rFRGN+WZJrBioz5nN4kR7mVFKa4w6z6Pu3D5WLyK7UQQkZJ64avdw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-09-18T11:59:23Z" - mac: ENC[AES256_GCM,data:dTejNchI4iKODArCaotXwVkLmjm+mt0u9KOajj1MBAUQ31p+0r5v3smrOO6ZdlCn4t+F8C8F//pnTw/zr8TSRYFbwMaJtDpPn5Dl/ZNuHmWgEM1JN/1obA6kfGaj5LVM01DhfzD5MGU9s3gSA9SjdRB4I1iT33nuO6xGIXgESn8=,iv:8isU2ZBSKqsmSZMRgebuP17o/tWSiq+nSmN5QyAAwPM=,tag:GVwlBmvvo5s7y3CIvyGi4Q==,type:str] + lastmodified: "2023-09-18T12:45:40Z" + mac: ENC[AES256_GCM,data:UfB8zJR4ijFPrm9942XL1uSPCN9wGSM/eEFyT/zEgtUkS8+y8pnRcMrDHBxxgB261us4XLL7lN3gxviPtlHJ3HpoftjRanmRdmyHkeWc3XTPNWHzAsWI9psLWAYOZGympY8nOoFnhgY3WaatMhETs/xB1rIH4k2C8mU3XwsnKhw=,iv:F29buZyeDQgmdZ7BEnpUvXkKcRwIhNvpNq9TJL9pDtk=,tag:b5bh1ATX6bbcboBnpeWApQ==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3