add debug statements on docker

This commit is contained in:
Ishaan Jaff 2024-08-06 15:29:49 -07:00
parent 1ef814dc97
commit 7024fcacec
2 changed files with 4 additions and 3 deletions

View file

@ -168,14 +168,14 @@ def missing_keys_form(missing_key_names: str):
return missing_keys_html_form.format(missing_keys=missing_key_names) return missing_keys_html_form.format(missing_keys=missing_key_names)
def setup_admin_ui_on_server_root_path(): def setup_admin_ui_on_server_root_path(server_root_path: str):
""" """
Helper util to setup Admin UI on Server root path Helper util to setup Admin UI on Server root path
""" """
from litellm._logging import verbose_proxy_logger from litellm._logging import verbose_proxy_logger
server_root_path = os.getenv("SERVER_ROOT_PATH", "")
if server_root_path != "": if server_root_path != "":
print("setting proxy base url to server root path") # noqa
if os.getenv("PROXY_BASE_URL") is None: if os.getenv("PROXY_BASE_URL") is None:
os.environ["PROXY_BASE_URL"] = server_root_path os.environ["PROXY_BASE_URL"] = server_root_path

View file

@ -284,8 +284,9 @@ except Exception as e:
pass pass
server_root_path = os.getenv("SERVER_ROOT_PATH", "") server_root_path = os.getenv("SERVER_ROOT_PATH", "")
print("server root path: ", server_root_path) # noqa
if server_root_path != "": if server_root_path != "":
setup_admin_ui_on_server_root_path() setup_admin_ui_on_server_root_path(server_root_path)
_license_check = LicenseCheck() _license_check = LicenseCheck()
premium_user: bool = _license_check.is_premium() premium_user: bool = _license_check.is_premium()
ui_link = f"{server_root_path}/ui/" ui_link = f"{server_root_path}/ui/"