mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
Parse g++ version instead of using string matching (#72)
This commit is contained in:
parent
97bc7e3fb6
commit
dea1bf3d04
4
webui.py
4
webui.py
@ -155,8 +155,8 @@ def update_dependencies():
|
||||
|
||||
# On some Linux distributions, g++ may not exist or be the wrong version to compile GPTQ-for-LLaMa
|
||||
if sys.platform.startswith("linux"):
|
||||
gxx_output = run_cmd("g++ --version", environment=True, capture_output=True)
|
||||
if gxx_output.returncode != 0 or b"g++ (GCC) 12" in gxx_output.stdout:
|
||||
gxx_output = run_cmd("g++ -dumpfullversion -dumpversion", environment=True, capture_output=True)
|
||||
if gxx_output.returncode != 0 or int(gxx_output.stdout.strip().split(b".")[0]) > 11:
|
||||
# Install the correct version of g++
|
||||
run_cmd("conda install -y -k gxx_linux-64=11.2.0", environment=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user