mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
fix windows vs unix line endings issue
This commit is contained in:
parent
883b99a789
commit
b4c07a85f5
2 changed files with 27 additions and 8 deletions
|
@ -0,0 +1,10 @@
|
|||
diff --git a/launch.py b/launch.py
|
||||
index cfc0cff..c013c29 100644
|
||||
--- a/launch.py
|
||||
+++ b/launch.py
|
||||
@@ -366,5 +366,4 @@ def start():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
- prepare_environment()
|
||||
start()
|
|
@ -22,7 +22,7 @@ build:
|
|||
gnu.org/wget: '*'
|
||||
protobuf.dev: '>=21'
|
||||
rust-lang.org: ^1 # docs say this is needed but I’m not convinced…
|
||||
git-scm.org: ^2
|
||||
gnu.org/patch: '*'
|
||||
script:
|
||||
# don’t download the models RN
|
||||
# --exit just installs deps and exits rather than boots the web server
|
||||
|
@ -52,19 +52,28 @@ build:
|
|||
cp lib/props/entrypoint.sh .
|
||||
cp lib/props/stable-diffusion-webui bin
|
||||
|
||||
# prepare for our patch
|
||||
# file has windows line-endings. our patch is unix line-endings
|
||||
- run: |
|
||||
sed -i.bak 's/\r//' launch.py
|
||||
rm launch.py.bak
|
||||
working-directory:
|
||||
lib
|
||||
|
||||
# removes the prepare_environment() step since we have already done that
|
||||
- run:
|
||||
patch -p1 < props/launch.py.diff
|
||||
working-directory:
|
||||
lib
|
||||
|
||||
# delete our crap
|
||||
- rm -rf lib/props lib/xyz.tea.* lib/tea.yaml
|
||||
|
||||
# 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 's|^ prepare_environment()||' lib/launch.py
|
||||
rm lib/launch.py.bak
|
||||
#FIXME ^^ please make a .patch work, I could not :/
|
||||
|
||||
# delete all the .git stuff to save >1GB
|
||||
# NOTE that this would cause the prepare_environment() step to fail
|
||||
- find . -name .git\* | xargs rm -rf
|
||||
|
||||
provides:
|
||||
|
|
Loading…
Reference in a new issue