pantry/projects/github.com/AUTOMATIC1111/stable-diffusion-webui/package.yml

72 lines
1.8 KiB
YAML
Raw Normal View History

2023-04-20 15:21:35 +03:00
distributable:
url: https://github.com/AUTOMATIC1111/stable-diffusion-webui/archive/22bcc7be.tar.gz
strip-components: 1
versions:
- 2023.03.29
dependencies:
python.org: ~3.10
2023-04-26 18:57:58 +03:00
tea.xyz: ^0 # our scripts use tea/cli
2023-04-20 15:21:35 +03:00
2023-04-24 22:57:50 +03:00
platforms: darwin
2023-04-24 20:46:43 +03:00
2023-04-20 15:21:35 +03:00
build:
dependencies:
pip.pypa.io: '*'
gnu.org/wget: '*'
protobuf.dev: '>=21'
rust-lang.org: ^1 # docs say this is needed but Im not convinced…
git-scm.org: ^2
script:
# dont download the models RN
# --exit just installs deps and exits rather than boots the web server
- echo 'export COMMANDLINE_ARGS="
--no-download-sd-model
--exit
$COMMANDLINE_ARGS"' > webui-user.sh
# or it clones HEAD and uses that
- mkdir -p .git
# installs python virtual-env
- ./webui.sh
# move this installation into its prefix
- run: |
mv $OLDWD lib
2023-04-24 22:19:58 +03:00
mkdir -p bin
2023-04-20 15:21:35 +03:00
mkdir $OLDWD # or breaks brewkit
working-directory: ${{prefix}}
- cd {{prefix}} # change CWD for remainder of our execution
# install our scripts and shims
- |
cp lib/props/webui-user.sh lib
2023-04-24 22:19:58 +03:00
cp lib/props/entrypoint.sh .
2023-04-20 15:21:35 +03:00
cp lib/props/stable-diffusion-webui bin
# delete our crap
2023-04-24 22:19:58 +03:00
- rm -rf lib/props lib/xyz.tea.* lib/tea.yaml
2023-04-20 15:21:35 +03:00
# we set this as a symlink to ~/.local/share/models in our stub scripts
- rm -rf lib/models/Stable-diffusion lib/extensions lib/outputs
# we prebuilt everything, but also we must remove this so we can trim
# the final package from 2.3GB to ~1GB which we will do in the next steps
- |
sed -i.bak '355s|prepare_environment()||' lib/launch.py
rm lib/launch.py.bak
#FIXME ^^ please make a .patch work, I could not :/
- find . -name .git\* | xargs rm -rf
provides:
- bin/stable-diffusion-webui
2023-04-24 22:19:58 +03:00
entrypoint: ./entrypoint.sh
2023-04-20 15:21:35 +03:00
test:
stable-diffusion-webui --help