Spaces:
Running
on
Zero
Running
on
Zero
Feature(MInference): fix env
Browse files- app.py +9 -9
- requirements.txt +2 -1
app.py
CHANGED
@@ -2,21 +2,21 @@ import subprocess
|
|
2 |
import os
|
3 |
# Install flash attention, skipping CUDA build if necessary
|
4 |
|
5 |
-
os.environ["CPATH"] = "$CPATH:/usr/local/cuda/include"
|
6 |
-
os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
7 |
-
os.environ["PATH"] = "$PATH:$CUDA_HOME/bin"
|
8 |
-
os.environ["LIBRARY_PATH"] = "$LIBRARY_PATH:/usr/local/cuda/lib64"
|
9 |
|
10 |
subprocess.run(
|
11 |
"/home/user/.pyenv/shims/pip install flash-attn --no-build-isolation",
|
12 |
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
13 |
shell=True,
|
14 |
)
|
15 |
-
subprocess.run(
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
)
|
20 |
|
21 |
import gradio as gr
|
22 |
import os
|
|
|
2 |
import os
|
3 |
# Install flash attention, skipping CUDA build if necessary
|
4 |
|
5 |
+
# os.environ["CPATH"] = "$CPATH:/usr/local/cuda/include"
|
6 |
+
# os.environ["CUDA_HOME"] = "/usr/local/cuda"
|
7 |
+
# os.environ["PATH"] = "$PATH:$CUDA_HOME/bin"
|
8 |
+
# os.environ["LIBRARY_PATH"] = "$LIBRARY_PATH:/usr/local/cuda/lib64"
|
9 |
|
10 |
subprocess.run(
|
11 |
"/home/user/.pyenv/shims/pip install flash-attn --no-build-isolation",
|
12 |
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
13 |
shell=True,
|
14 |
)
|
15 |
+
# subprocess.run(
|
16 |
+
# "/home/user/.pyenv/shims/pip install pycuda==2023.1",
|
17 |
+
# env={"CPATH": "$CPATH:/usr/local/cuda/include", "LIBRARY_PATH": "$LIBRARY_PATH:/usr/local/cuda/lib64"},
|
18 |
+
# shell=True,
|
19 |
+
# )
|
20 |
|
21 |
import gradio as gr
|
22 |
import os
|
requirements.txt
CHANGED
@@ -2,4 +2,5 @@ triton==2.1.0
|
|
2 |
accelerate
|
3 |
transformers
|
4 |
wheel
|
5 |
-
setuptools
|
|
|
|
2 |
accelerate
|
3 |
transformers
|
4 |
wheel
|
5 |
+
setuptools
|
6 |
+
pycuda==2023.1
|