NagisaNao commited on
Commit
80b11b0
1 Parent(s): f3d8f0f
files_cells/notebooks/en/downloading_en.ipynb CHANGED
@@ -64,39 +64,60 @@
64
  "flag_file = f\"{root_path}/libraries_installed.txt\"\n",
65
  "\n",
66
  "if not os.path.exists(flag_file):\n",
67
- " # automatic1111 update webui to 1.8.0\n",
68
- " xformers = \"xformers==0.0.23.post1 triton==2.1.0\"\n",
69
- " torch = \"torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121\"\n",
70
  "\n",
71
- " print(\"💿 Installing the libraries, it's going to take a while...\", end='')\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  " with capture.capture_output() as cap:\n",
73
- " !pip install -U gdown\n",
74
- " !apt-get update && apt -y install aria2\n",
75
- " !npm install -g localtunnel &> /dev/null\n",
76
  " !curl -s -OL https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel --output-dir {root_path}\n",
77
  " !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
78
- " !pip install insightface\n",
79
  " !curl -sLO https://github.com/openziti/zrok/releases/download/v0.4.23/zrok_0.4.23_linux_amd64.tar.gz && tar -xzf zrok_0.4.23_linux_amd64.tar.gz -C /usr/bin && rm -f zrok_0.4.23_linux_amd64.tar.gz\n",
 
 
80
  "\n",
81
- " if env == \"SageMaker Studio Lab\":\n",
82
- " %pip install -q opencv-python-headless huggingface-hub\n",
83
- " %conda update -q -n base conda\n",
84
- " %conda install -q -y aria2\n",
85
- " %conda install -q -y glib\n",
86
- " !pip install tensorflow\n",
87
  "\n",
88
- " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
 
 
89
  "\n",
90
- " if env == \"Google Colab\":\n",
91
- " !pip install xformers==0.0.25 --no-deps\n",
92
- " else:\n",
93
- " !pip install -q {torch} -U\n",
94
- " !pip install -q {xformers} -U\n",
95
- "\n",
96
- " with open(flag_file, \"w\") as f:\n",
97
- " f.write(\"hey ;3\")\n",
98
- " del cap\n",
99
- " print(\"\\r🍪 Libraries are installed!\" + \" \"*35)\n",
100
  " time.sleep(2)\n",
101
  " clear_output()\n",
102
  "\n",
 
64
  "flag_file = f\"{root_path}/libraries_installed.txt\"\n",
65
  "\n",
66
  "if not os.path.exists(flag_file):\n",
67
+ " print(\"💿 Installing the libraries, it's going to take a while...\\n\")\n",
 
 
68
  "\n",
69
+ " install_lib = {\n",
70
+ " \"gdown\": \"pip install -U gdown\",\n",
71
+ " \"aria2\": \"apt-get update && apt -y install aria2\",\n",
72
+ " \"localtunnel\": \"npm install -g localtunnel &> /dev/null\",\n",
73
+ " \"insightface\": \"pip install insightface\",\n",
74
+ " }\n",
75
+ "\n",
76
+ " # Dictionary of additional libraries specific to certain environments\n",
77
+ " additional_libs = {\n",
78
+ " \"Google Colab\": {\n",
79
+ " \"xformers\": \"pip install xformers==0.0.25 --no-deps\"\n",
80
+ " },\n",
81
+ " \"Kaggle\": {\n",
82
+ " \"xformers\": \"pip install -q xformers==0.0.23.post1 triton==2.1.0\",\n",
83
+ " \"torch\": \"pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121\"\n",
84
+ " },\n",
85
+ " \"SageMaker Studio Lab\": {\n",
86
+ " \"opencv\": \"pip install -q opencv-python-headless\",\n",
87
+ " \"huggingface\": \"pip install -q huggingface-hub\",\n",
88
+ " \"conda_update\": \"conda update -q -n base conda\",\n",
89
+ " \"conda_aria2\": \"conda install -q -y aria2\",\n",
90
+ " \"conda_glib\": \"conda install -q -y glib\",\n",
91
+ " \"tensorflow\": \"pip install tensorflow\",\n",
92
+ " \"xformers\": \"pip install -q xformers==0.0.23.post1 triton==2.1.0\",\n",
93
+ " \"torch\": \"pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121\"\n",
94
+ " }\n",
95
+ " }\n",
96
+ "\n",
97
+ " # If the current environment has additional libraries, update the install_lib dictionary\n",
98
+ " if env in additional_libs:\n",
99
+ " install_lib.update(additional_libs[env])\n",
100
+ "\n",
101
+ " # Loop through libraries and execute install commands\n",
102
+ " for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):\n",
103
+ " print(f\"\\r[{index}/{len(install_lib)}] \\033[32m>>\\033[0m Installing \\033[33m{package}\\033[0m...\" + \" \"*35, end='')\n",
104
+ " subprocess.run(install_cmd, shell=True, capture_output=True)\n",
105
+ "\n",
106
+ " # Additional manual installation steps for specific packages\n",
107
  " with capture.capture_output() as cap:\n",
 
 
 
108
  " !curl -s -OL https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel --output-dir {root_path}\n",
109
  " !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
 
110
  " !curl -sLO https://github.com/openziti/zrok/releases/download/v0.4.23/zrok_0.4.23_linux_amd64.tar.gz && tar -xzf zrok_0.4.23_linux_amd64.tar.gz -C /usr/bin && rm -f zrok_0.4.23_linux_amd64.tar.gz\n",
111
+ " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
112
+ " del cap\n",
113
  "\n",
114
+ " clear_output()\n",
 
 
 
 
 
115
  "\n",
116
+ " # Save file install lib\n",
117
+ " with open(flag_file, \"w\") as f:\n",
118
+ " f.write(\">W<'\")\n",
119
  "\n",
120
+ " print(\"🍪 Libraries are installed!\" + \" \"*35)\n",
 
 
 
 
 
 
 
 
 
121
  " time.sleep(2)\n",
122
  " clear_output()\n",
123
  "\n",
files_cells/notebooks/ru/downloading_ru.ipynb CHANGED
@@ -100,7 +100,7 @@
100
  "\n",
101
  " # Loop through libraries and execute install commands\n",
102
  " for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):\n",
103
- " print(f\"\\r[{index}/{len(install_lib)}] \\033[32m>>\\033[0m Installing \\033[33m{package}\\033[96m...\\033[0m\", end='')\n",
104
  " subprocess.run(install_cmd, shell=True, capture_output=True)\n",
105
  "\n",
106
  " # Additional manual installation steps for specific packages\n",
 
100
  "\n",
101
  " # Loop through libraries and execute install commands\n",
102
  " for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):\n",
103
+ " print(f\"\\r[{index}/{len(install_lib)}] \\033[32m>>\\033[0m Installing \\033[33m{package}\\033[0m...\" + \" \"*35, end='')\n",
104
  " subprocess.run(install_cmd, shell=True, capture_output=True)\n",
105
  "\n",
106
  " # Additional manual installation steps for specific packages\n",
files_cells/python/en/downloading_en.py CHANGED
@@ -45,39 +45,60 @@ if env == "SageMaker Studio Lab":
45
  flag_file = f"{root_path}/libraries_installed.txt"
46
 
47
  if not os.path.exists(flag_file):
48
- # automatic1111 update webui to 1.8.0
49
- xformers = "xformers==0.0.23.post1 triton==2.1.0"
50
- torch = "torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121"
51
 
52
- print("💿 Installing the libraries, it's going to take a while...", end='')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  with capture.capture_output() as cap:
54
- get_ipython().system('pip install -U gdown')
55
- get_ipython().system('apt-get update && apt -y install aria2')
56
- get_ipython().system('npm install -g localtunnel &> /dev/null')
57
  get_ipython().system('curl -s -OL https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel --output-dir {root_path}')
58
  get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
59
- get_ipython().system('pip install insightface')
60
  get_ipython().system('curl -sLO https://github.com/openziti/zrok/releases/download/v0.4.23/zrok_0.4.23_linux_amd64.tar.gz && tar -xzf zrok_0.4.23_linux_amd64.tar.gz -C /usr/bin && rm -f zrok_0.4.23_linux_amd64.tar.gz')
 
 
61
 
62
- if env == "SageMaker Studio Lab":
63
- get_ipython().run_line_magic('pip', 'install -q opencv-python-headless huggingface-hub')
64
- get_ipython().run_line_magic('conda', 'update -q -n base conda')
65
- get_ipython().run_line_magic('conda', 'install -q -y aria2')
66
- get_ipython().run_line_magic('conda', 'install -q -y glib')
67
- get_ipython().system('pip install tensorflow')
68
 
69
- get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
 
 
70
 
71
- if env == "Google Colab":
72
- get_ipython().system('pip install xformers==0.0.25 --no-deps')
73
- else:
74
- get_ipython().system('pip install -q {torch} -U')
75
- get_ipython().system('pip install -q {xformers} -U')
76
-
77
- with open(flag_file, "w") as f:
78
- f.write("hey ;3")
79
- del cap
80
- print("\r🍪 Libraries are installed!" + " "*35)
81
  time.sleep(2)
82
  clear_output()
83
 
 
45
  flag_file = f"{root_path}/libraries_installed.txt"
46
 
47
  if not os.path.exists(flag_file):
48
+ print("💿 Installing the libraries, it's going to take a while...\n")
 
 
49
 
50
+ install_lib = {
51
+ "gdown": "pip install -U gdown",
52
+ "aria2": "apt-get update && apt -y install aria2",
53
+ "localtunnel": "npm install -g localtunnel &> /dev/null",
54
+ "insightface": "pip install insightface",
55
+ }
56
+
57
+ # Dictionary of additional libraries specific to certain environments
58
+ additional_libs = {
59
+ "Google Colab": {
60
+ "xformers": "pip install xformers==0.0.25 --no-deps"
61
+ },
62
+ "Kaggle": {
63
+ "xformers": "pip install -q xformers==0.0.23.post1 triton==2.1.0",
64
+ "torch": "pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121"
65
+ },
66
+ "SageMaker Studio Lab": {
67
+ "opencv": "pip install -q opencv-python-headless",
68
+ "huggingface": "pip install -q huggingface-hub",
69
+ "conda_update": "conda update -q -n base conda",
70
+ "conda_aria2": "conda install -q -y aria2",
71
+ "conda_glib": "conda install -q -y glib",
72
+ "tensorflow": "pip install tensorflow",
73
+ "xformers": "pip install -q xformers==0.0.23.post1 triton==2.1.0",
74
+ "torch": "pip install -q torch==2.1.2+cu121 torchvision==0.16.2+cu121 torchaudio==2.1.2 --extra-index-url https://download.pytorch.org/whl/cu121"
75
+ }
76
+ }
77
+
78
+ # If the current environment has additional libraries, update the install_lib dictionary
79
+ if env in additional_libs:
80
+ install_lib.update(additional_libs[env])
81
+
82
+ # Loop through libraries and execute install commands
83
+ for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):
84
+ print(f"\r[{index}/{len(install_lib)}] \033[32m>>\033[0m Installing \033[33m{package}\033[0m..." + " "*35, end='')
85
+ subprocess.run(install_cmd, shell=True, capture_output=True)
86
+
87
+ # Additional manual installation steps for specific packages
88
  with capture.capture_output() as cap:
 
 
 
89
  get_ipython().system('curl -s -OL https://github.com/DEX-1101/sd-webui-notebook/raw/main/res/new_tunnel --output-dir {root_path}')
90
  get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
 
91
  get_ipython().system('curl -sLO https://github.com/openziti/zrok/releases/download/v0.4.23/zrok_0.4.23_linux_amd64.tar.gz && tar -xzf zrok_0.4.23_linux_amd64.tar.gz -C /usr/bin && rm -f zrok_0.4.23_linux_amd64.tar.gz')
92
+ get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
93
+ del cap
94
 
95
+ clear_output()
 
 
 
 
 
96
 
97
+ # Save file install lib
98
+ with open(flag_file, "w") as f:
99
+ f.write(">W<'")
100
 
101
+ print("🍪 Libraries are installed!" + " "*35)
 
 
 
 
 
 
 
 
 
102
  time.sleep(2)
103
  clear_output()
104
 
files_cells/python/ru/downloading_ru.py CHANGED
@@ -81,7 +81,7 @@ if not os.path.exists(flag_file):
81
 
82
  # Loop through libraries and execute install commands
83
  for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):
84
- print(f"\r[{index}/{len(install_lib)}] \033[32m>>\033[0m Installing \033[33m{package}\033[96m...\033[0m", end='')
85
  subprocess.run(install_cmd, shell=True, capture_output=True)
86
 
87
  # Additional manual installation steps for specific packages
 
81
 
82
  # Loop through libraries and execute install commands
83
  for index, (package, install_cmd) in enumerate(install_lib.items(), start=1):
84
+ print(f"\r[{index}/{len(install_lib)}] \033[32m>>\033[0m Installing \033[33m{package}\033[0m..." + " "*35, end='')
85
  subprocess.run(install_cmd, shell=True, capture_output=True)
86
 
87
  # Additional manual installation steps for specific packages