Parse g++ version instead of using string matching (#72)
This commit is contained in:
parent
97bc7e3fb6
commit
dea1bf3d04
1 changed files with 2 additions and 2 deletions
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
|
# On some Linux distributions, g++ may not exist or be the wrong version to compile GPTQ-for-LLaMa
|
||||||
if sys.platform.startswith("linux"):
|
if sys.platform.startswith("linux"):
|
||||||
gxx_output = run_cmd("g++ --version", environment=True, capture_output=True)
|
gxx_output = run_cmd("g++ -dumpfullversion -dumpversion", environment=True, capture_output=True)
|
||||||
if gxx_output.returncode != 0 or b"g++ (GCC) 12" in gxx_output.stdout:
|
if gxx_output.returncode != 0 or int(gxx_output.stdout.strip().split(b".")[0]) > 11:
|
||||||
# Install the correct version of g++
|
# Install the correct version of g++
|
||||||
run_cmd("conda install -y -k gxx_linux-64=11.2.0", environment=True)
|
run_cmd("conda install -y -k gxx_linux-64=11.2.0", environment=True)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue