Spaces:
Running
on
Zero
Running
on
Zero
gokaygokay
commited on
Update app.py
Browse files
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]
|
50 |
|
51 |
-
run_command("make
|
52 |
|
53 |
# Reinstall the package with CUDA support
|
54 |
-
run_command('pip install -e .
|
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")
|