latest changes
This commit is contained in:
parent
cfa54fac5d
commit
45df063a34
20
LICENSE
Normal file
20
LICENSE
Normal 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.
|
12
README.md
12
README.md
|
@ -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>
|
66
flake.nix
66
flake.nix
|
@ -36,21 +36,20 @@
|
||||||
|
|
||||||
cyanovision = {
|
cyanovision = {
|
||||||
name = "cyanovision";
|
name = "cyanovision";
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "IoannouPanayiotis";
|
owner = "IoannouPanayiotis";
|
||||||
repo = "Sensor-CDT-Team-Challenge-2021-2022";
|
repo = "Sensor-CDT-Team-Challenge-2021-2022";
|
||||||
rev = "fd7e538b8afc2227a1100bdd42903b282fcf46bb";
|
rev = "fd7e538b8afc2227a1100bdd42903b282fcf46bb";
|
||||||
sha256 = "sha256-e4kEuvH3my4gzOhP9zWCWSUOYokJJ7JBRXSpeMQkkp0=";
|
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; [
|
packagesExtra = with pkgs; [
|
||||||
|
bash
|
||||||
libusb1
|
libusb1
|
||||||
libsndfile
|
libsndfile
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPackages = with pkgs.python310Packages; [
|
pythonPackages = with pkgs.python310Packages; [
|
||||||
matplotlib
|
matplotlib
|
||||||
numpy
|
numpy
|
||||||
|
@ -60,12 +59,16 @@
|
||||||
tensorflow
|
tensorflow
|
||||||
tkinter
|
tkinter
|
||||||
];
|
];
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
# cyanovision-deps = machNix.mkPython {
|
tflite-model-maker = machNix.buildPythonPackage {
|
||||||
# packagesExtra = cyanovision.packagesExtra;
|
src = builtins.fetchGit {
|
||||||
# requirements = cyanovision.requirements.release;
|
url = "https://github.com/tensorflow/examples/tree/master/tensorflow_examples/lite/model_maker";
|
||||||
# providers.tensorflow = "nixpkgs";
|
ref = "master";
|
||||||
# };
|
rev = "32b080729d0a995fc06c3df4441d685ff1ca3e55";
|
||||||
|
};
|
||||||
|
extras = ["grpc" "libsndfile"];
|
||||||
|
};
|
||||||
|
|
||||||
cyanovision-ui = pkgs.python3Packages.buildPythonApplication rec {
|
cyanovision-ui = pkgs.python3Packages.buildPythonApplication rec {
|
||||||
pname = "${cyanovision.name}-ui";
|
pname = "${cyanovision.name}-ui";
|
||||||
|
@ -73,16 +76,7 @@
|
||||||
src = cyanovision.src;
|
src = cyanovision.src;
|
||||||
|
|
||||||
propagatedBuildInputs = cyanovision.packagesExtra;
|
propagatedBuildInputs = cyanovision.packagesExtra;
|
||||||
|
pythonPath = cyanovision.pythonPackages;
|
||||||
pythonPath = with pkgs.python310Packages; [
|
|
||||||
matplotlib
|
|
||||||
numpy
|
|
||||||
pathlib2
|
|
||||||
pillow
|
|
||||||
pycocotools
|
|
||||||
tensorflow
|
|
||||||
tkinter
|
|
||||||
];
|
|
||||||
|
|
||||||
format = "other";
|
format = "other";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -109,6 +103,7 @@
|
||||||
patchShebangs --host $out/bin/${pname}
|
patchShebangs --host $out/bin/${pname}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
cyanovision-model = pkgs.stdenv.mkDerivation {
|
cyanovision-model = pkgs.stdenv.mkDerivation {
|
||||||
name = cyanovision.name + "-model";
|
name = cyanovision.name + "-model";
|
||||||
src = cyanovision.src;
|
src = cyanovision.src;
|
||||||
|
@ -119,6 +114,7 @@
|
||||||
'';
|
'';
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cyanovision-dataset = pkgs.stdenv.mkDerivation {
|
cyanovision-dataset = pkgs.stdenv.mkDerivation {
|
||||||
name = cyanovision.name + "-dataset";
|
name = cyanovision.name + "-dataset";
|
||||||
src = cyanovision.src;
|
src = cyanovision.src;
|
||||||
|
@ -132,9 +128,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
venv = machNix.mkPython {
|
python-venv = machNix.mkPython {
|
||||||
packagesExtra = cyanovision.packagesExtra;
|
packagesExtra = cyanovision.packagesExtra;
|
||||||
requirements = cyanovision.requirements.release;
|
requirements = ''
|
||||||
|
tensorflow
|
||||||
|
# tflite-model-maker==0.3.2
|
||||||
|
'';
|
||||||
providers.tensorflow = "nixpkgs";
|
providers.tensorflow = "nixpkgs";
|
||||||
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
|
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
|
||||||
};
|
};
|
||||||
|
@ -146,39 +145,34 @@
|
||||||
|
|
||||||
defaultApp = apps.jupyterlab;
|
defaultApp = apps.jupyterlab;
|
||||||
|
|
||||||
# packages.cyanovision-deps = cyanovision.packages.cyanovision-deps;
|
|
||||||
packages.cyanovision-ui = cyanovision.packages.cyanovision-ui;
|
packages.cyanovision-ui = cyanovision.packages.cyanovision-ui;
|
||||||
packages.cyanovision-model = cyanovision.packages.cyanovision-model;
|
packages.cyanovision-model = cyanovision.packages.cyanovision-model;
|
||||||
packages.cyanovision-dataset = cyanovision.packages.cyanovision-dataset;
|
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 =
|
packages.docker =
|
||||||
(machNix.mkDockerImage {
|
(machNix.mkDockerImage {
|
||||||
packagesExtra = with pkgs; [bash libusb1 libsndfile];
|
packagesExtra = cyanovision.packagesExtra;
|
||||||
requirements = builtins.readFile ./requirements/release.txt;
|
requirements = cyanovision.pythonPackages;
|
||||||
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
|
_.pytest-cov.propagatedBuildInputs.mod = pySelf: self: oldVal: oldVal ++ [pySelf.tomli];
|
||||||
})
|
})
|
||||||
.override
|
.override
|
||||||
(oldAttrs: {
|
(oldAttrs: {
|
||||||
name = "cyanovision";
|
name = cyanovision.name;
|
||||||
config.Cmd = ["jupyter" "lab" "--notebook-dir=/mnt" "--allow-root" "--ip=0.0.0.0"];
|
config.Cmd = ["jupyter" "lab" "--notebook-dir=/mnt" "--allow-root" "--ip=0.0.0.0"];
|
||||||
});
|
});
|
||||||
|
|
||||||
defaultPackage = packages.cyanovision-ui;
|
defaultPackage = packages.cyanovision-ui;
|
||||||
|
|
||||||
# devShell = jupyterEnvironment.env;
|
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
name = "nix-cyanovision";
|
name = "nix-${cyanovision.name}";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
# cyanovision-dataset
|
cyanovision.packagesExtra
|
||||||
# cyanovision-model
|
cyanovision.pythonPackages
|
||||||
# cyanovision-ui
|
python-venv
|
||||||
venv
|
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.libusb1
|
|
||||||
];
|
];
|
||||||
shellHook = ''
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
autopep8
|
|
||||||
coverage
|
|
||||||
flake8
|
|
||||||
pep8
|
|
||||||
pycodestyle
|
|
||||||
pyflakes
|
|
||||||
pylint
|
|
||||||
pytest
|
|
||||||
pytest-cov
|
|
||||||
python-dateutil
|
|
||||||
PyYAML
|
|
||||||
toml
|
|
|
@ -1,12 +0,0 @@
|
||||||
matplotlib
|
|
||||||
numpy
|
|
||||||
pathlib
|
|
||||||
# PIL
|
|
||||||
pycocotools
|
|
||||||
# tensorflow
|
|
||||||
tflite
|
|
||||||
# tflite-model-maker
|
|
||||||
# tflite-support
|
|
||||||
# tflite-model-maker==0.3.2
|
|
||||||
# tkinter
|
|
||||||
jupyterlab
|
|
Loading…
Reference in a new issue