Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchFromGitHub 5, pythonAtLeast 6 7, coqpit 8, fsspec 9, torch-bin 10, tensorboardx 11, protobuf 12, psutil 13 14, pytestCheckHook 15, soundfile 16, torchvision-bin 17}: 18 19let 20 pname = "trainer"; 21 version = "0.0.26"; 22in 23buildPythonPackage { 24 inherit pname version; 25 format = "pyproject"; 26 27 src = fetchFromGitHub { 28 owner = "coqui-ai"; 29 repo = "Trainer"; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-poC1aCXBb5mjZvqQjxhiv3+mKK262rxisgkHvAuNCsk="; 32 }; 33 34 postPatch = '' 35 sed -i 's/^protobuf.*/protobuf/' requirements.txt 36 ''; 37 38 propagatedBuildInputs = [ 39 coqpit 40 fsspec 41 protobuf 42 psutil 43 soundfile 44 tensorboardx 45 torch-bin 46 ]; 47 48 # only one test and that requires training data from the internet 49 doCheck = false; 50 51 nativeCheckInputs = [ 52 pytestCheckHook 53 torchvision-bin 54 ]; 55 56 pythonImportsCheck = [ 57 "trainer" 58 ]; 59 60 meta = with lib; { 61 description = "A general purpose model trainer, as flexible as it gets"; 62 homepage = "https://github.com/coqui-ai/Trainer"; 63 changelog = "https://github.com/coqui-ai/Trainer/releases/tag/v${version}"; 64 license = licenses.asl20; 65 maintainers = teams.tts.members; 66 }; 67}