python -m venv venv
./venv/Scripts/activate
!!! This needs to be done before installing pip requirements, because pip will think that torch is already installed and not install the correct version. !!!
Go to https://pytorch.org/get-started/locally/, choose the appropriate options, and run the command that is generated.
Note: can also be run without CUDA, but it will be much slower to generate speech.
For Windows it would be:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Then install packages from requirements.txt:
pip install -r requirements.txt
python src/main.py
I've been building with MSVC, which can be installed through Visual Studio Installer. The --msvc switch can be removed if you want Nuitka to figure out which compiler to use.
standalone:
nuitka --msvc="14.3" --lto=no --standalone --module-parameter=torch-disable-jit=no --include-package-data=bark --noinclude-data-files="torch/include" --noinclude-dlls="torch/*" --output-dir=dist/ --output-filename=bark src/main.py
onefile:
nuitka --msvc="14.3" --lto=no --onefile --module-parameter=torch-disable-jit=no --disable-console --include-package-data=bark --noinclude-data-files="torch/include" --noinclude-dlls="torch/*" --output-dir=dist/ --output-filename=bark src/main.py
deactivate
rm -r venv
python -m venv venv
./venv/Scripts/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt