From d9ecf261da39a07c0bdba47b2936d629c57813c6 Mon Sep 17 00:00:00 2001 From: Sebastian Wendel Date: Wed, 28 Sep 2022 00:34:06 +0200 Subject: [PATCH] latest changes --- README.md | 20 +++++++++++++++++++- flake.nix | 20 ++++++++++++++------ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d0ead60..dbc20af 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ ## Commands +### Build a Jupiterhub Docker Container + +```sh +nix build .#cyanovision-docker -o ./build/cyanovision.tgz +``` + +```sh +docker load < ./build/cyanovision.tgz +docker run --rm -it -p 8888:8888 -v $HOME:/mnt cyanovision +``` + +Now [access JupyterHub webinterface](http://127.0.0.1:8888/lab) to develop Notebooks. + ### Run the Cyanovision UI ```sh @@ -10,5 +23,10 @@ nix run https://code.curious.bio/curious.bio/nix-cyanovision#. ## Links -* * +* + +### + +* +* diff --git a/flake.nix b/flake.nix index ac78add..0dc0d08 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,7 @@ iPython = pkgs.kernels.iPythonWith { name = cyanovision.name; - packages = p: with p; [sympy numpy]; + packages = cyanovision.pythonPackages ++ cyanovision.jupyterEnvironment; ignoreCollisions = true; }; @@ -50,12 +50,18 @@ libsndfile ]; + jupyterlabPackages = with pkgs; [ + nodejs + npm + ]; + pythonPackages = with pkgs.python310Packages; [ matplotlib numpy pathlib2 pillow pycocotools + sympy tensorflow tkinter ]; @@ -149,12 +155,14 @@ packages.cyanovision-model = cyanovision.packages.cyanovision-model; packages.cyanovision-dataset = cyanovision.packages.cyanovision-dataset; packages.tflite-model-maker = cyanovision.packages.tflite-model-maker; - packages.python-venv = python-venv; - - packages.docker = + packages.cyanovision-venv = python-venv; + packages.cyanovision-docker = (machNix.mkDockerImage { - packagesExtra = cyanovision.packagesExtra; - requirements = cyanovision.pythonPackages; + # packagesExtra = pkgs.lib.mkMerge ( + # cyanovision.packagesExtra + # cyanovision.jupyterlabPackages + # ); + requirements = "jupyterlab"; _.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli]; }) .override