latest changes

This commit is contained in:
Sebastian Wendel 2022-09-27 19:40:00 +02:00
parent cfa54fac5d
commit 45df063a34
No known key found for this signature in database
GPG key ID: 1422B7DF78144640
5 changed files with 62 additions and 60 deletions

20
LICENSE Normal file
View file

@ -0,0 +1,20 @@
Copyright (c) 2022 Sebastian Wendel
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,12 @@
# Cyanovision Nix Flake
## Commands
```sh
```
## Links
* <https://nixos.org/download.html>
* <https://github.com/IoannouPanayiotis/Sensor-CDT-Team-Challenge-2021-2022>

View file

@ -36,21 +36,20 @@
cyanovision = {
name = "cyanovision";
src = pkgs.fetchFromGitHub {
owner = "IoannouPanayiotis";
repo = "Sensor-CDT-Team-Challenge-2021-2022";
rev = "fd7e538b8afc2227a1100bdd42903b282fcf46bb";
sha256 = "sha256-e4kEuvH3my4gzOhP9zWCWSUOYokJJ7JBRXSpeMQkkp0=";
};
requirements = {
release = builtins.readFile ./requirements/release.txt;
dev = builtins.readFile ./requirements/dev.txt;
all = cyanovision.requirements.release + cyanovision.requirements.dev;
};
packagesExtra = with pkgs; [
bash
libusb1
libsndfile
];
pythonPackages = with pkgs.python310Packages; [
matplotlib
numpy
@ -60,12 +59,16 @@
tensorflow
tkinter
];
packages = {
# cyanovision-deps = machNix.mkPython {
# packagesExtra = cyanovision.packagesExtra;
# requirements = cyanovision.requirements.release;
# providers.tensorflow = "nixpkgs";
# };
tflite-model-maker = machNix.buildPythonPackage {
src = builtins.fetchGit {
url = "https://github.com/tensorflow/examples/tree/master/tensorflow_examples/lite/model_maker";
ref = "master";
rev = "32b080729d0a995fc06c3df4441d685ff1ca3e55";
};
extras = ["grpc" "libsndfile"];
};
cyanovision-ui = pkgs.python3Packages.buildPythonApplication rec {
pname = "${cyanovision.name}-ui";
@ -73,16 +76,7 @@
src = cyanovision.src;
propagatedBuildInputs = cyanovision.packagesExtra;
pythonPath = with pkgs.python310Packages; [
matplotlib
numpy
pathlib2
pillow
pycocotools
tensorflow
tkinter
];
pythonPath = cyanovision.pythonPackages;
format = "other";
doCheck = false;
@ -109,6 +103,7 @@
patchShebangs --host $out/bin/${pname}
'';
};
cyanovision-model = pkgs.stdenv.mkDerivation {
name = cyanovision.name + "-model";
src = cyanovision.src;
@ -119,6 +114,7 @@
'';
doCheck = false;
};
cyanovision-dataset = pkgs.stdenv.mkDerivation {
name = cyanovision.name + "-dataset";
src = cyanovision.src;
@ -132,9 +128,12 @@
};
};
venv = machNix.mkPython {
python-venv = machNix.mkPython {
packagesExtra = cyanovision.packagesExtra;
requirements = cyanovision.requirements.release;
requirements = ''
tensorflow
# tflite-model-maker==0.3.2
'';
providers.tensorflow = "nixpkgs";
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
};
@ -146,39 +145,34 @@
defaultApp = apps.jupyterlab;
# packages.cyanovision-deps = cyanovision.packages.cyanovision-deps;
packages.cyanovision-ui = cyanovision.packages.cyanovision-ui;
packages.cyanovision-model = cyanovision.packages.cyanovision-model;
packages.cyanovision-dataset = cyanovision.packages.cyanovision-dataset;
packages.venv = venv;
packages.tflite-model-maker = cyanovision.packages.tflite-model-maker;
packages.python-venv = python-venv;
packages.docker =
(machNix.mkDockerImage {
packagesExtra = with pkgs; [bash libusb1 libsndfile];
requirements = builtins.readFile ./requirements/release.txt;
packagesExtra = cyanovision.packagesExtra;
requirements = cyanovision.pythonPackages;
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
})
.override
(oldAttrs: {
name = "cyanovision";
name = cyanovision.name;
config.Cmd = ["jupyter" "lab" "--notebook-dir=/mnt" "--allow-root" "--ip=0.0.0.0"];
});
defaultPackage = packages.cyanovision-ui;
# devShell = jupyterEnvironment.env;
devShell = pkgs.mkShell {
name = "nix-cyanovision";
name = "nix-${cyanovision.name}";
buildInputs = [
# cyanovision-dataset
# cyanovision-model
# cyanovision-ui
venv
cyanovision.packagesExtra
cyanovision.pythonPackages
python-venv
pkgs.git
pkgs.libusb1
];
shellHook = ''
'';
};
});
}

View file

@ -1,12 +0,0 @@
autopep8
coverage
flake8
pep8
pycodestyle
pyflakes
pylint
pytest
pytest-cov
python-dateutil
PyYAML
toml

View file

@ -1,12 +0,0 @@
matplotlib
numpy
pathlib
# PIL
pycocotools
# tensorflow
tflite
# tflite-model-maker
# tflite-support
# tflite-model-maker==0.3.2
# tkinter
jupyterlab