mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-09-16 23:30:48 +00:00
fix: fix pytorch version to avoid wheel bug (#1123)
* fix: fix pytorch version * fix: settings env var regex and split * fix: add models folder for docker user
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Any, TextIO
|
||||
|
||||
from yaml import SafeLoader
|
||||
|
||||
_env_replace_matcher = re.compile(r"\$\{(\w|_)+(:(\w|_)*)?}")
|
||||
_env_replace_matcher = re.compile(r"\$\{(\w|_)+:?.*}")
|
||||
|
||||
|
||||
@typing.no_type_check # pyaml does not have good hints, everything is Any
|
||||
@@ -22,7 +22,7 @@ def load_yaml_with_envvars(
|
||||
def load_env_var(_, node) -> str:
|
||||
"""Extract the matched value, expand env variable, and replace the match."""
|
||||
value = str(node.value).removeprefix("${").removesuffix("}")
|
||||
split = value.split(":")
|
||||
split = value.split(":", 1)
|
||||
env_var = split[0]
|
||||
value = environ.get(env_var)
|
||||
default = None if len(split) == 1 else split[1]
|
||||
|
Reference in New Issue
Block a user