mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Fix sysctl check on non-arm Macs
Signed-off-by: Frank Murphy <frank@wallaroo.ai>
This commit is contained in:
parent
1047c5e038
commit
355d5bc14e
@ -32,7 +32,7 @@ EmbeddingsType = TypeVar('EmbeddingsType', bound='list[Any]')
|
|||||||
# Detect Rosetta 2
|
# Detect Rosetta 2
|
||||||
if platform.system() == "Darwin" and platform.processor() == "i386":
|
if platform.system() == "Darwin" and platform.processor() == "i386":
|
||||||
if subprocess.run(
|
if subprocess.run(
|
||||||
"sysctl -n sysctl.proc_translated".split(), check=True, capture_output=True, text=True,
|
"sysctl -n sysctl.proc_translated".split(), capture_output=True, text=True,
|
||||||
).stdout.strip() == "1":
|
).stdout.strip() == "1":
|
||||||
raise RuntimeError(textwrap.dedent("""\
|
raise RuntimeError(textwrap.dedent("""\
|
||||||
Running GPT4All under Rosetta is not supported due to CPU feature requirements.
|
Running GPT4All under Rosetta is not supported due to CPU feature requirements.
|
||||||
|
Loading…
Reference in New Issue
Block a user