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