fffiloni commited on
Commit
5ebef38
·
verified ·
1 Parent(s): 444d38e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -5,13 +5,20 @@ import shutil
5
  import tempfile
6
 
7
  # Set the PATH and LD_LIBRARY_PATH for CUDA 12.3
8
- cuda_bin_path = "/usr/local/cuda-12.3/bin"
9
- cuda_lib_path = "/usr/local/cuda-12.3/lib64"
10
 
11
  # Update the environment variables
12
  os.environ['PATH'] = f"{cuda_bin_path}:{os.environ.get('PATH', '')}"
13
  os.environ['LD_LIBRARY_PATH'] = f"{cuda_lib_path}:{os.environ.get('LD_LIBRARY_PATH', '')}"
14
 
 
 
 
 
 
 
 
15
  from huggingface_hub import snapshot_download
16
 
17
  # Create xcodec_mini_infer folder
 
5
  import tempfile
6
 
7
  # Set the PATH and LD_LIBRARY_PATH for CUDA 12.3
8
+ cuda_bin_path = "/usr/local/cuda/bin"
9
+ cuda_lib_path = "/usr/local/cuda/lib64"
10
 
11
  # Update the environment variables
12
  os.environ['PATH'] = f"{cuda_bin_path}:{os.environ.get('PATH', '')}"
13
  os.environ['LD_LIBRARY_PATH'] = f"{cuda_lib_path}:{os.environ.get('LD_LIBRARY_PATH', '')}"
14
 
15
+ # Install flash attention
16
+ subprocess.run(
17
+ "pip install flash-attn --no-build-isolation",
18
+ env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
19
+ shell=True,
20
+ )
21
+
22
  from huggingface_hub import snapshot_download
23
 
24
  # Create xcodec_mini_infer folder