Update start.py
Browse files
start.py
CHANGED
@@ -1,16 +1,7 @@
|
|
1 |
-
import os
|
2 |
import subprocess
|
3 |
|
4 |
-
#
|
5 |
subprocess.run("pip uninstall -y llama-cpp-python", shell=True)
|
6 |
|
7 |
-
|
8 |
-
cuda_path = os.environ.get("CUDA_PATH", "/usr/local/cuda")
|
9 |
-
nvcc_path = os.path.join(cuda_path, "bin", "nvcc")
|
10 |
-
|
11 |
-
# Set the CMAKE_CUDA_COMPILER environment variable
|
12 |
-
os.environ["CMAKE_CUDA_COMPILER"] = nvcc_path
|
13 |
-
|
14 |
-
# Install llama-cpp-python with CUDA support
|
15 |
-
install_command = "pip install llama-cpp-python --install-option='--cmake-args=-DLLAMA_CUDA=on'"
|
16 |
subprocess.run(install_command, shell=True)
|
|
|
|
|
1 |
import subprocess
|
2 |
|
3 |
+
# commented because the existing llama-cpp-python package was renoved fron requirements.txt
|
4 |
subprocess.run("pip uninstall -y llama-cpp-python", shell=True)
|
5 |
|
6 |
+
install_command = "CMAKE_ARGS='-DLLAMA_CUDA=on -DCMAKE_CUDA_COMPILER=/home/user/local/cuda/bin/nvcc' pip install llama-cpp-python"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
subprocess.run(install_command, shell=True)
|