gokaygokay commited on
Commit
8fe1ead
·
verified ·
1 Parent(s): 6f051ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -29,16 +29,21 @@ def install_packages():
29
  # Upgrade pip
30
  run_command("pip install --upgrade pip")
31
 
32
- # Install all optional dependencies
33
- run_command("pip install -e .[all]")
 
 
 
 
 
34
 
35
  # Clear the local build cache
36
  run_command("make GGML_CUDA=1")
37
 
38
  run_command("make clean")
39
 
40
- # Reinstall the package
41
- run_command('pip install -e .')
42
 
43
  # Install llama-cpp-agent
44
  run_command("pip install llama-cpp-agent")
 
29
  # Upgrade pip
30
  run_command("pip install --upgrade pip")
31
 
32
+ # Set environment variables for CUDA support
33
+ os.environ["CUDA_HOME"] = "/usr/local/cuda" # Adjust this path if needed
34
+ os.environ["CMAKE_ARGS"] = "-DLLAMA_CUBLAS=on"
35
+ os.environ["FORCE_CMAKE"] = "1"
36
+
37
+ # Install all optional dependencies with CUDA support
38
+ run_command("pip install -e .[all,cuda]")
39
 
40
  # Clear the local build cache
41
  run_command("make GGML_CUDA=1")
42
 
43
  run_command("make clean")
44
 
45
+ # Reinstall the package with CUDA support
46
+ run_command('pip install -e . --force-reinstall --no-deps --no-cache-dir')
47
 
48
  # Install llama-cpp-agent
49
  run_command("pip install llama-cpp-agent")