Update venvv.py
Browse files
venvv.py
CHANGED
@@ -1,19 +1,15 @@
|
|
1 |
-
import subprocess
|
2 |
-
import sys
|
3 |
-
import os
|
4 |
-
import time
|
5 |
|
6 |
xxx = '/kaggle/working'
|
7 |
|
8 |
os.chdir(xxx)
|
9 |
-
os.system(f'curl -
|
10 |
sys.path.append(xxx)
|
11 |
time.sleep(1)
|
12 |
from pantat88 import say, download
|
13 |
say('【{red} Installing VENV{d} 】{red}')
|
14 |
|
15 |
auuuwooo = [
|
16 |
-
f"curl -LO https://huggingface.co/pantat88/ui/resolve/main/nenen88.py",
|
17 |
f"curl -LO https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/get_ip.py",
|
18 |
f"curl -LO https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel",
|
19 |
f"curl -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64",
|
@@ -24,21 +20,20 @@ auuuwooo = [
|
|
24 |
f"chmod +x /usr/bin/cl"]
|
25 |
|
26 |
for tarzan in auuuwooo:
|
27 |
-
|
28 |
|
29 |
def venv_in():
|
30 |
os.chdir('/kaggle')
|
31 |
-
|
32 |
url = 'https://huggingface.co/pantat88/back_up/resolve/main/venv_torch220.tar.lz4'
|
33 |
fn = 'venv_torch220.tar.lz4'
|
34 |
download(url)
|
35 |
|
36 |
extract_tar = f'pv {fn} | lz4 -d | tar xf -'
|
37 |
-
proc = subprocess.Popen(extract_tar, shell=True, stdout=subprocess.PIPE, stderr=subprocess.
|
38 |
-
|
39 |
-
|
40 |
-
print(output)
|
41 |
|
|
|
42 |
os.remove(fn)
|
43 |
|
44 |
oppai = '/kaggle/venv'
|
|
|
1 |
+
import subprocess, sys, os, time
|
|
|
|
|
|
|
2 |
|
3 |
xxx = '/kaggle/working'
|
4 |
|
5 |
os.chdir(xxx)
|
6 |
+
os.system(f'curl -sLO https://raw.githubusercontent.com/gutris1/segsmaker/main/kaggle/script/pantat88.py')
|
7 |
sys.path.append(xxx)
|
8 |
time.sleep(1)
|
9 |
from pantat88 import say, download
|
10 |
say('【{red} Installing VENV{d} 】{red}')
|
11 |
|
12 |
auuuwooo = [
|
|
|
13 |
f"curl -LO https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/get_ip.py",
|
14 |
f"curl -LO https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel",
|
15 |
f"curl -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64",
|
|
|
20 |
f"chmod +x /usr/bin/cl"]
|
21 |
|
22 |
for tarzan in auuuwooo:
|
23 |
+
subprocess.run(tarzan.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
24 |
|
25 |
def venv_in():
|
26 |
os.chdir('/kaggle')
|
|
|
27 |
url = 'https://huggingface.co/pantat88/back_up/resolve/main/venv_torch220.tar.lz4'
|
28 |
fn = 'venv_torch220.tar.lz4'
|
29 |
download(url)
|
30 |
|
31 |
extract_tar = f'pv {fn} | lz4 -d | tar xf -'
|
32 |
+
proc = subprocess.Popen(extract_tar, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
33 |
+
for line in proc.stdout:
|
34 |
+
print(line, end='')
|
|
|
35 |
|
36 |
+
proc.wait()
|
37 |
os.remove(fn)
|
38 |
|
39 |
oppai = '/kaggle/venv'
|