gokaygokay commited on
Commit
a316152
·
verified ·
1 Parent(s): d55de31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -45,13 +45,18 @@ def install_packages():
45
  # Upgrade pip
46
  run_command("pip install --upgrade pip")
47
 
 
 
 
 
 
48
  # Install all optional dependencies with CUDA support
49
- run_command("pip install -e .[all]") # Add --verbose for more detailed output
50
 
51
- run_command("make GGML_CUDA=1")
52
 
53
  # Reinstall the package with CUDA support
54
- run_command('pip install -e .[all]')
55
 
56
  # Install llama-cpp-agent
57
  run_command("pip install llama-cpp-agent")
 
45
  # Upgrade pip
46
  run_command("pip install --upgrade pip")
47
 
48
+ # Set environment variables for CUDA support
49
+ os.environ["CUDA_HOME"] = "/usr/local/cuda" # Adjust this path if needed
50
+ os.environ["CMAKE_ARGS"] = "-DGGML_CUDA=on -DCUDAToolkit_ROOT=/usr/local/cuda"
51
+ os.environ["FORCE_CMAKE"] = "1"
52
+
53
  # Install all optional dependencies with CUDA support
54
+ run_command("pip install -e .[all] --verbose")
55
 
56
+ run_command("make clean")
57
 
58
  # Reinstall the package with CUDA support
59
+ run_command('pip install -e . --force-reinstall --no-deps --no-cache-dir --verbose')
60
 
61
  # Install llama-cpp-agent
62
  run_command("pip install llama-cpp-agent")