NagisaNao commited on
Commit
4ea7a04
·
verified ·
1 Parent(s): a343809
files_cells/notebooks/ru/downloading_ru.ipynb CHANGED
@@ -53,8 +53,6 @@
53
  "# ================ LIBRARIES ================\n",
54
  "flag_file = f\"{root_path}/libraries_installed.txt\"\n",
55
  "\n",
56
- "print(f\"Среда выполнения: \\033[33m{env}\\n\\033[0m\")\n",
57
- "\n",
58
  "if not os.path.exists(flag_file):\n",
59
  " xformers = \"xformers==0.0.20 triton==2.0.0\"\n",
60
  " torch = \"torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118\"\n",
 
53
  "# ================ LIBRARIES ================\n",
54
  "flag_file = f\"{root_path}/libraries_installed.txt\"\n",
55
  "\n",
 
 
56
  "if not os.path.exists(flag_file):\n",
57
  " xformers = \"xformers==0.0.20 triton==2.0.0\"\n",
58
  " torch = \"torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118\"\n",
files_cells/notebooks/ru/launch_ru.ipynb CHANGED
@@ -30,8 +30,6 @@
30
  "import requests\n",
31
  "import cloudpickle as pickle\n",
32
  "from datetime import timedelta\n",
33
- "from colorama import init, Fore, Back, Style\n",
34
- "\n",
35
  "\n",
36
  "# ================= DETECT ENV =================\n",
37
  "def detect_environment():\n",
@@ -51,7 +49,6 @@
51
  "webui_path = f\"{root_path}/sdw\"\n",
52
  "# ----------------------------------------------\n",
53
  "\n",
54
- "\n",
55
  "def load_settings():\n",
56
  " SETTINGS_FILE = f'{root_path}/settings.json'\n",
57
  " if os.path.exists(SETTINGS_FILE):\n",
@@ -63,9 +60,7 @@
63
  "ngrok_token = settings['ngrok_token']\n",
64
  "commandline_arguments = settings['commandline_arguments']\n",
65
  "\n",
66
- "\n",
67
  "# ======================== TUNNEL ========================\n",
68
- "\n",
69
  "password = \"x1101\"\n",
70
  "def get_public_ip(version='ipv4'):\n",
71
  " try:\n",
@@ -83,11 +78,10 @@
83
  "tunnel_port= 1101\n",
84
  "tunnel = tunnel_class(tunnel_port)\n",
85
  "tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
86
- "tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + Fore.GREEN + public_ipv4 + Style.RESET_ALL + \" rerun cell if 404 error.\")\n",
87
  "\n",
88
  "# ======================== TUNNEL ========================\n",
89
  "\n",
90
- "\n",
91
  "# fixing path...\n",
92
  "!sed -i 's#\\/home\\/studio-lab-user\\/content#{root_path}#g' {webui_path}/config.json\n",
93
  "\n",
 
30
  "import requests\n",
31
  "import cloudpickle as pickle\n",
32
  "from datetime import timedelta\n",
 
 
33
  "\n",
34
  "# ================= DETECT ENV =================\n",
35
  "def detect_environment():\n",
 
49
  "webui_path = f\"{root_path}/sdw\"\n",
50
  "# ----------------------------------------------\n",
51
  "\n",
 
52
  "def load_settings():\n",
53
  " SETTINGS_FILE = f'{root_path}/settings.json'\n",
54
  " if os.path.exists(SETTINGS_FILE):\n",
 
60
  "ngrok_token = settings['ngrok_token']\n",
61
  "commandline_arguments = settings['commandline_arguments']\n",
62
  "\n",
 
63
  "# ======================== TUNNEL ========================\n",
 
64
  "password = \"x1101\"\n",
65
  "def get_public_ip(version='ipv4'):\n",
66
  " try:\n",
 
78
  "tunnel_port= 1101\n",
79
  "tunnel = tunnel_class(tunnel_port)\n",
80
  "tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
81
+ "tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + \"\\033[32m\" + public_ipv4 + \"\\033[0m\" + \" rerun cell if 404 error.\")\n",
82
  "\n",
83
  "# ======================== TUNNEL ========================\n",
84
  "\n",
 
85
  "# fixing path...\n",
86
  "!sed -i 's#\\/home\\/studio-lab-user\\/content#{root_path}#g' {webui_path}/config.json\n",
87
  "\n",
files_cells/python/ru/launch_ru.py CHANGED
@@ -12,8 +12,6 @@ import json
12
  import requests
13
  import cloudpickle as pickle
14
  from datetime import timedelta
15
- from colorama import init, Fore, Back, Style
16
-
17
 
18
  # ================= DETECT ENV =================
19
  def detect_environment():
@@ -33,7 +31,6 @@ env, root_path = detect_environment()
33
  webui_path = f"{root_path}/sdw"
34
  # ----------------------------------------------
35
 
36
-
37
  def load_settings():
38
  SETTINGS_FILE = f'{root_path}/settings.json'
39
  if os.path.exists(SETTINGS_FILE):
@@ -45,9 +42,7 @@ settings = load_settings()
45
  ngrok_token = settings['ngrok_token']
46
  commandline_arguments = settings['commandline_arguments']
47
 
48
-
49
  # ======================== TUNNEL ========================
50
-
51
  password = "x1101"
52
  def get_public_ip(version='ipv4'):
53
  try:
@@ -65,11 +60,10 @@ tunnel_class = pickle.load(open(f"{root_path}/new_tunnel", "rb"), encoding="utf-
65
  tunnel_port= 1101
66
  tunnel = tunnel_class(tunnel_port)
67
  tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
68
- tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + Fore.GREEN + public_ipv4 + Style.RESET_ALL + " rerun cell if 404 error.")
69
 
70
  # ======================== TUNNEL ========================
71
 
72
-
73
  # fixing path...
74
  get_ipython().system("sed -i 's#\\/home\\/studio-lab-user\\/content#{root_path}#g' {webui_path}/config.json")
75
 
 
12
  import requests
13
  import cloudpickle as pickle
14
  from datetime import timedelta
 
 
15
 
16
  # ================= DETECT ENV =================
17
  def detect_environment():
 
31
  webui_path = f"{root_path}/sdw"
32
  # ----------------------------------------------
33
 
 
34
  def load_settings():
35
  SETTINGS_FILE = f'{root_path}/settings.json'
36
  if os.path.exists(SETTINGS_FILE):
 
42
  ngrok_token = settings['ngrok_token']
43
  commandline_arguments = settings['commandline_arguments']
44
 
 
45
  # ======================== TUNNEL ========================
 
46
  password = "x1101"
47
  def get_public_ip(version='ipv4'):
48
  try:
 
60
  tunnel_port= 1101
61
  tunnel = tunnel_class(tunnel_port)
62
  tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
63
+ tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + "\033[32m" + public_ipv4 + "\033[0m" + " rerun cell if 404 error.")
64
 
65
  # ======================== TUNNEL ========================
66
 
 
67
  # fixing path...
68
  get_ipython().system("sed -i 's#\\/home\\/studio-lab-user\\/content#{root_path}#g' {webui_path}/config.json")
69