Difference between revisions of "Porting/chaiNNer"
Jump to navigation
Jump to search
JeremyRand (talk | contribs) (See Also Electron) |
JeremyRand (talk | contribs) (Installation on Debian Bookworm) |
||
Line 1: | Line 1: | ||
+ | = Installation on Debian Bookworm = | ||
+ | |||
+ | * [[Porting/PyTorch#Debian|Install PyTorch]] | ||
+ | * [[Porting/Chromium/Electron#Installation_on_Debian_via_Bedrock|Install Electron]] | ||
+ | * Pin Debian's <code>python3</code> so that Electron will use Debian's PyTorch package (See [https://bedrocklinux.org/0.7/workflows.html#pinning Bedrock pinning instructions]) | ||
+ | * <code>sudo brl apply</code> | ||
+ | * [https://chainner.app/download Download] and extract a portable zip Linux x86_64 binary of chaiNNer. | ||
+ | * Rename <code>chainner</code> executable in chaiNNer directory to <code>chainner.bak</code> (this is an Electron executable; we will replace it with the ppc64le Electron that we installed). | ||
+ | * Rename <code>portable</code> file in chaiNNer directory to <code>portable.bak</code> (skip this step if you want chaiNNer configuration to be stored in chaiNNer's directory instead of <code>$HOME</code>) | ||
+ | * In chaiNNer's directory, create the following shell script named <code>chainner</code>: | ||
+ | #!/usr/bin/env bash | ||
+ | |||
+ | cd $(dirname "$0") | ||
+ | electron ./resources/app "$@" --no-sandbox | ||
+ | * Give the <code>chainner</code> script executable permissions, and (if you like) add the chaiNNer directory to your <code>PATH</code>. | ||
+ | * Run chaiNNer once, and quickly exit. | ||
+ | * Run the following commands to take care of some remaining dependencies: | ||
+ | echo true > ~/.config/chaiNNer/settings/use-system-python | ||
+ | ln -s -T /bedrock/cross/bin/ffprobe ~/.config/chaiNNer/ffmpeg/ffprobe | ||
+ | ln -s -T /bedrock/cross/bin/ffmpeg ~/.config/chaiNNer/ffmpeg/ffmpeg | ||
+ | sudo apt install python3-requests libre2-dev | ||
+ | pip install --user --break-system-packages sanic Sanic-Cors ffmpeg-python google-re2 | ||
+ | * chaiNNer is installed! | ||
+ | |||
= Finished = | = Finished = | ||
Revision as of 19:18, 11 June 2023
Installation on Debian Bookworm
- Install PyTorch
- Install Electron
- Pin Debian's
python3
so that Electron will use Debian's PyTorch package (See Bedrock pinning instructions) sudo brl apply
- Download and extract a portable zip Linux x86_64 binary of chaiNNer.
- Rename
chainner
executable in chaiNNer directory tochainner.bak
(this is an Electron executable; we will replace it with the ppc64le Electron that we installed). - Rename
portable
file in chaiNNer directory toportable.bak
(skip this step if you want chaiNNer configuration to be stored in chaiNNer's directory instead of$HOME
) - In chaiNNer's directory, create the following shell script named
chainner
:
#!/usr/bin/env bash cd $(dirname "$0") electron ./resources/app "$@" --no-sandbox
- Give the
chainner
script executable permissions, and (if you like) add the chaiNNer directory to yourPATH
. - Run chaiNNer once, and quickly exit.
- Run the following commands to take care of some remaining dependencies:
echo true > ~/.config/chaiNNer/settings/use-system-python ln -s -T /bedrock/cross/bin/ffprobe ~/.config/chaiNNer/ffmpeg/ffprobe ln -s -T /bedrock/cross/bin/ffmpeg ~/.config/chaiNNer/ffmpeg/ffmpeg sudo apt install python3-requests libre2-dev pip install --user --break-system-packages sanic Sanic-Cors ffmpeg-python google-re2
- chaiNNer is installed!
Finished
- --no-sandbox Electron flag causes ChaiNNer to error
- Fix argument parsing to allow passthrough of extra args
- Fix backend script path detection with external Electron
- Add --devtools argument