Spaces:
Runtime error
Runtime error
FlawedLLM
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,26 @@ def run_command(cmd, shell=False):
|
|
22 |
except subprocess.CalledProcessError as e:
|
23 |
print(f"Error executing command: {e.stderr}")
|
24 |
subprocess.run(["pip", "install", "--upgrade", "pip"], check=True)
|
25 |
-
subprocess.run(["pip", "install", "--upgrade", "torch"], check=True)
|
26 |
# subprocess.run(["pip", "install", "--upgrade", "transformers"], check=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
run_command(["pip", "install", "--no-deps", "trl", "peft", "accelerate", "bitsandbytes"])
|
28 |
# subprocess.run(["pip", "install", "--upgrade", "peft"], check=True)
|
29 |
-
subprocess.run(["pip", "install", "
|
30 |
# subprocess.run(["pip", "install", "--upgrade", "accelerate"], check=True)
|
31 |
-
subprocess.run(["
|
32 |
# import subprocess
|
33 |
|
34 |
|
|
|
22 |
except subprocess.CalledProcessError as e:
|
23 |
print(f"Error executing command: {e.stderr}")
|
24 |
subprocess.run(["pip", "install", "--upgrade", "pip"], check=True)
|
25 |
+
# subprocess.run(["pip", "install", "--upgrade", "torch"], check=True)
|
26 |
# subprocess.run(["pip", "install", "--upgrade", "transformers"], check=True)
|
27 |
+
# Pip install command as a list
|
28 |
+
pip_command = [
|
29 |
+
"pip",
|
30 |
+
"install",
|
31 |
+
"--upgrade",
|
32 |
+
"--force-reinstall",
|
33 |
+
"--no-cache-dir",
|
34 |
+
"torch==2.1.1",
|
35 |
+
"triton",
|
36 |
+
"--index-url",
|
37 |
+
"https://download.pytorch.org/whl/cu121"
|
38 |
+
]
|
39 |
+
run_command(pip_command)
|
40 |
run_command(["pip", "install", "--no-deps", "trl", "peft", "accelerate", "bitsandbytes"])
|
41 |
# subprocess.run(["pip", "install", "--upgrade", "peft"], check=True)
|
42 |
+
subprocess.run(["pip", "install", "xformers"], check=True)
|
43 |
# subprocess.run(["pip", "install", "--upgrade", "accelerate"], check=True)
|
44 |
+
subprocess.run(["unsloth[cu121-ampere-torch211] @ git+https://github.com/unslothai/unsloth.git"], check=True)
|
45 |
# import subprocess
|
46 |
|
47 |
|