From cd6c4635b3c69b7f3e6a9c7fab984c8485cd456c Mon Sep 17 00:00:00 2001 From: David Crompton Date: Tue, 16 Jan 2024 11:17:40 -0500 Subject: [PATCH] JupyterHub: Fix python kernel definition --- machines/kcnhub/servers/jupyterhub.nix | 69 ++++++++++++-------------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/machines/kcnhub/servers/jupyterhub.nix b/machines/kcnhub/servers/jupyterhub.nix index 09935bf..ee144a6 100644 --- a/machines/kcnhub/servers/jupyterhub.nix +++ b/machines/kcnhub/servers/jupyterhub.nix @@ -9,43 +9,41 @@ c.SystemdSpawner.cpu_limit = 1.0 ''; kernels = { - python = { - python3 = let - env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ - # Necessary for use as a kernel - ipykernel + python3 = let + env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ + # Necessary for use as a kernel + ipykernel - # Common Python Libraries - numpy - scipy - scikit-learn - pandas - matplotlib - seaborn + # Common Python Libraries + numpy + scipy + scikit-learn + pandas + matplotlib + seaborn - # Neural Data Processing Libraries - mne-python - nibabel - neo - - # Neurosimulators - neuronpy - nest - brian2 - ])); - in { - displayName = "Python 3 for Computational Neuroscience"; - 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"; - }; + # Neural Data Processing Libraries + mne-python + nibabel + neo + + # Neurosimulators + neuronpy + nest + brian2 + ])); + in { + displayName = "Python 3 for Computational Neuroscience"; + 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"; }; }; }; @@ -57,5 +55,4 @@ ''; }; }; - }