From 2ab2e6eed182ee774b5ddd29837acf2853bb84af Mon Sep 17 00:00:00 2001 From: Cyberes Date: Wed, 8 May 2024 22:19:57 -0600 Subject: [PATCH] fix service file --- llm_server/config/global_config.py | 2 ++ other/local-llm-server.service | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/llm_server/config/global_config.py b/llm_server/config/global_config.py index cc62e46..54a7fba 100644 --- a/llm_server/config/global_config.py +++ b/llm_server/config/global_config.py @@ -12,4 +12,6 @@ class GlobalConfig: @classmethod def get(cls): + if cls.__config_model is None: + raise Exception('Config has not been initialised') return cls.__config_model diff --git a/other/local-llm-server.service b/other/local-llm-server.service index fe1c9f8..82d6a14 100644 --- a/other/local-llm-server.service +++ b/other/local-llm-server.service @@ -14,7 +14,7 @@ ExecStartPre=/usr/bin/pkill -9 -f "/srv/server/local-llm-server/venv/bin/python3 # TODO: make sure gunicorn logs to stdout and logging also goes to stdout # Need a lot of workers since we have long-running requests. This takes about 3.5G memory. -ExecStart=/srv/server/local-llm-server/venv/bin/gunicorn --workers 20 --bind 0.0.0.0:5000 server:app --timeout 60 --worker-class gevent --access-logfile '-' --error-logfile '-' +ExecStart=/srv/server/local-llm-server/venv/bin/gunicorn -c other/gunicorn_conf.py --workers 20 --bind 0.0.0.0:5000 server:app --timeout 60 --worker-class gevent --access-logfile '-' --error-logfile '-' Restart=always RestartSec=2