Spaces:
Running
Running
stlaurentjr
commited on
Commit
•
41ab713
1
Parent(s):
3e64403
Update scripts/mainrunpodA1111.py
Browse files
scripts/mainrunpodA1111.py
CHANGED
@@ -22,12 +22,19 @@ import zipfile
|
|
22 |
|
23 |
|
24 |
def Deps(force_reinstall):
|
25 |
-
|
26 |
-
|
|
|
27 |
ntbks()
|
28 |
print('[1;32mModules and notebooks updated, dependencies already installed')
|
29 |
os.environ['TORCH_HOME'] = '/workspace/cache/torch'
|
30 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
else:
|
32 |
call('pip install --root-user-action=ignore --disable-pip-version-check --no-deps -qq gdown PyWavelets numpy==1.23.5 accelerate==0.12.0 --force-reinstall', shell=True, stdout=open('/dev/null', 'w'))
|
33 |
ntbks()
|
@@ -54,7 +61,6 @@ def Deps(force_reinstall):
|
|
54 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
55 |
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.10/warnings.py", shell=True)
|
56 |
clear_output()
|
57 |
-
|
58 |
done()
|
59 |
|
60 |
|
|
|
22 |
|
23 |
|
24 |
def Deps(force_reinstall):
|
25 |
+
# Определяем путь к файлу-маркеру
|
26 |
+
marker_file = '/workspace/setup_complete'
|
27 |
+
if not force_reinstall and not os.path.exists(marker_file):
|
28 |
ntbks()
|
29 |
print('[1;32mModules and notebooks updated, dependencies already installed')
|
30 |
os.environ['TORCH_HOME'] = '/workspace/cache/torch'
|
31 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
32 |
+
call("pip install controlnet_aux --root-user-action=ignore --disable-pip-version-check", shell=True, stdout=open('/dev/null', 'w'))
|
33 |
+
call("pip install diskcache --root-user-action=ignore --disable-pip-version-check", shell=True, stdout=open('/dev/null', 'w'))
|
34 |
+
call("pip install pillow-avif-plugin --root-user-action=ignore --disable-pip-version-check", shell=True, stdout=open('/dev/null', 'w'))
|
35 |
+
call('pip install --root-user-action=ignore --disable-pip-version-check -qq gradio==3.41.2', shell=True, stdout=open('/dev/null', 'w'))
|
36 |
+
clear_output()
|
37 |
+
done()
|
38 |
else:
|
39 |
call('pip install --root-user-action=ignore --disable-pip-version-check --no-deps -qq gdown PyWavelets numpy==1.23.5 accelerate==0.12.0 --force-reinstall', shell=True, stdout=open('/dev/null', 'w'))
|
40 |
ntbks()
|
|
|
61 |
os.environ['PYTHONWARNINGS'] = 'ignore'
|
62 |
call("sed -i 's@text = _formatwarnmsg(msg)@text =\"\"@g' /usr/lib/python3.10/warnings.py", shell=True)
|
63 |
clear_output()
|
|
|
64 |
done()
|
65 |
|
66 |
|