first commit
This commit is contained in:
commit
54b95c659a
43
default.nix
Normal file
43
default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
with import <nixos-unstable>
|
||||
{
|
||||
config = { allowUnfree = true; cudaSupport = true; };
|
||||
overlays = [
|
||||
(
|
||||
final: prev: {
|
||||
final.python310 = prev.python310.override {
|
||||
enableOptimizations = true;
|
||||
reproducibleBuild = false;
|
||||
self = final.python310;
|
||||
buildInputs = [ final.ffmpeg-full ];
|
||||
};
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(
|
||||
python-final: python-prev: {
|
||||
pytorch-seed = python-final.callPackage ./pythonPackages/pytorch-seed { };
|
||||
audiolm-pytorch = python-final.callPackage ./pythonPackages/audiolm-pytorch { };
|
||||
vector-quantize-pytorch = python-final.callPackage ./pythonPackages/vector-quantize-pytorch { };
|
||||
local-attention = python-final.callPackage ./pythonPackages/local-attention { };
|
||||
ema-pytorch = python-final.callPackage ./pythonPackages/ema-pytorch { };
|
||||
|
||||
openai-triton = python-prev.openai-triton-bin;
|
||||
torch = python-prev.torch-bin;
|
||||
torchaudio = python-prev.torchaudio-bin;
|
||||
|
||||
bark-gui = python-final.callPackage ./pythonPackages/bark-gui.nix { };
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
pkgs.mkShell rec {
|
||||
name = "barkTestEnv";
|
||||
buildInputs = [
|
||||
(pkgs.python310.withPackages (ps: with ps; [ bark-gui ]))
|
||||
];
|
||||
shellHook = ''
|
||||
echo ${python310Packages.bark-gui}
|
||||
'';
|
||||
}
|
||||
55
pythonPackages/audiolm-pytorch/default.nix
Normal file
55
pythonPackages/audiolm-pytorch/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, packaging
|
||||
, torch
|
||||
, einops
|
||||
, beartype
|
||||
, torchaudio
|
||||
, fairseq
|
||||
, transformers
|
||||
, vector-quantize-pytorch
|
||||
, local-attention
|
||||
, encodec
|
||||
, lion-pytorch
|
||||
, ema-pytorch
|
||||
, accelerate
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "audiolm-pytorch";
|
||||
version = "1.7.6";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-Roo17hhrlNqnAt43kKQRnkHn6fvtW+vEVxLVHK0k884=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
packaging
|
||||
torch
|
||||
einops
|
||||
beartype
|
||||
torchaudio
|
||||
fairseq
|
||||
transformers
|
||||
vector-quantize-pytorch
|
||||
local-attention
|
||||
encodec
|
||||
lion-pytorch
|
||||
ema-pytorch
|
||||
accelerate
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "audiolm_pytorch" ];
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
83
pythonPackages/bark-gui.nix
Normal file
83
pythonPackages/bark-gui.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, writeShellScript
|
||||
, setuptools
|
||||
|
||||
# dependencies
|
||||
, fairseq
|
||||
, audiolm-pytorch
|
||||
, gradio
|
||||
, funcy
|
||||
, linkify-it-py
|
||||
, mutagen
|
||||
, pytorch-seed
|
||||
, pyyaml
|
||||
, sentencepiece
|
||||
, transformers
|
||||
|
||||
, ffmpeg-full
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "bark-gui";
|
||||
format = "pyproject";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "C0untFloyd";
|
||||
repo = "${pname}";
|
||||
rev = "v07.1";
|
||||
sha256 = "sha256-3UvX8c8SSzfeTleGU2FoAhmSj+EG0RPMtqozaopt9Fk=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
fairseq
|
||||
audiolm-pytorch
|
||||
gradio
|
||||
funcy
|
||||
linkify-it-py
|
||||
mutagen
|
||||
pytorch-seed
|
||||
pyyaml
|
||||
sentencepiece
|
||||
transformers
|
||||
];
|
||||
buildInputs = [
|
||||
setuptools
|
||||
ffmpeg-full
|
||||
];
|
||||
|
||||
dontWrapPythonPrograms = true;
|
||||
postFixup =
|
||||
let
|
||||
setupScript = writeShellScript "bark-gui" ''
|
||||
if [[ ! -d $HOME/.bark-gui ]]; then
|
||||
mkdir -p $HOME
|
||||
cp -r ${src} $HOME/.bark-gui
|
||||
chmod 0755 $HOME/.bark-gui
|
||||
chmod 0644 $HOME/.bark-gui/config.yaml
|
||||
mkdir -p $HOME/.bark-gui/training/data/output
|
||||
mkdir -p $HOME/.bark-gui/training/inputtext
|
||||
chmod 755 $HOME/.bark-gui/training/data/output $HOME/.bark-gui/training/inputtext $HOME/.bark-gui/bark/assets/prompts/custom/
|
||||
fi
|
||||
pushd "$PWD"
|
||||
cd $HOME/.bark-gui/
|
||||
MYOLDPATH="$PATH"
|
||||
export PATH="$PATH:${ffmpeg-full.bin}/bin/"
|
||||
python webui.py "$@"
|
||||
export PATH="$MYOLDPATH"
|
||||
popd
|
||||
'';
|
||||
in
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${setupScript} $out/bin/bark-gui
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
33
pythonPackages/ema-pytorch/default.nix
Normal file
33
pythonPackages/ema-pytorch/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, torch
|
||||
, beartype
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ema-pytorch";
|
||||
version = "0.3.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-xZv/45dxN2aYUUAq9JRlCWcJnalAD1SuMbyU+//jBhw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
torch
|
||||
beartype
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "ema_pytorch" ];
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
33
pythonPackages/local-attention/default.nix
Normal file
33
pythonPackages/local-attention/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, torch
|
||||
, einops
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "local-attention";
|
||||
version = "1.9.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-p7F53JIjWLS7SLMXLPs0nttFnRvc5YnYN4alel42kKY=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
torch
|
||||
einops
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "local_attention" ];
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
33
pythonPackages/pytorch-seed/default.nix
Normal file
33
pythonPackages/pytorch-seed/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, torch
|
||||
, numpy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytorch_seed";
|
||||
version = "0.2.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-CW7dNAT4oA898rq0ECSUWAa68fZLBWeMgjc7eARY4aM=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
torch
|
||||
numpy
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pytorch_seed" ];
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
33
pythonPackages/vector-quantize-pytorch/default.nix
Normal file
33
pythonPackages/vector-quantize-pytorch/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, torch
|
||||
, einops
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "vector_quantize_pytorch";
|
||||
version = "1.11.7";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-kMKeWhnTXbI+ROPJ0LHVh7TQjonhRzXUQm+U8TgghSM=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
torch
|
||||
einops
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "vector_quantize_pytorch" ];
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue