mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 13:55:41 +01: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:
parent
895588b82a
commit
24cfddd60f
5 changed files with 1150 additions and 480 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue