From faae37b43fc73c6a8b84cad96093a6fc012245d1 Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Sat, 27 Apr 2024 11:37:26 +0200 Subject: [PATCH 1/2] Changing the path in cgAdminFrontend and cgUserFrontend in Order to use python virtual environments --- codeGrader/scripts/cgAdminFrontend.py | 2 +- codeGrader/scripts/cgUserFrontend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codeGrader/scripts/cgAdminFrontend.py b/codeGrader/scripts/cgAdminFrontend.py index 0fb2541..29fab95 100644 --- a/codeGrader/scripts/cgAdminFrontend.py +++ b/codeGrader/scripts/cgAdminFrontend.py @@ -31,7 +31,7 @@ def main(): Starting a new instance of the EvaluationService @return: """ - os.chdir("/usr/local/lib/python3.11/dist-packages/codeGrader/frontend/admin") + os.chdir("opt/CodeGrader_venv/lib/python3.11/site-packages/codeGrader/frontend/admin") admin_frontend() diff --git a/codeGrader/scripts/cgUserFrontend.py b/codeGrader/scripts/cgUserFrontend.py index a1f2442..d741bfd 100644 --- a/codeGrader/scripts/cgUserFrontend.py +++ b/codeGrader/scripts/cgUserFrontend.py @@ -31,7 +31,7 @@ def main(): Starting a new instance of the EvaluationService @return: """ - os.chdir("/usr/local/lib/python3.11/dist-packages/codeGrader/frontend/user") + os.chdir("opt/CodeGrader_venv/lib/python3.11/site-packages/codeGrader/frontend/user") user_frontend() From 43ed5977ff33c10bf3c9977fa0da0fd7fa1e3403 Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Sat, 27 Apr 2024 11:38:41 +0200 Subject: [PATCH 2/2] chaning paths in service files to use python venv --- services/cgAdminFrontend.service | 2 +- services/cgApiBackend.service | 2 +- services/cgEvaluationService.service | 2 +- services/cgExecutionService.service | 2 +- services/cgUserFrontend.service | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/cgAdminFrontend.service b/services/cgAdminFrontend.service index 7f3b0b2..8b5013d 100644 --- a/services/cgAdminFrontend.service +++ b/services/cgAdminFrontend.service @@ -5,7 +5,7 @@ After=network.target [Service] User=root WorkingDirectory=/ -ExecStart=nohup cgAdminFrontend > /var/log/cgAdminFrontend.log & +ExecStart=nohup /opt/CodeGrader_venv/bin/cgAdminFrontend > /var/log/cgAdminFrontend.log & # optional items below Restart=always RestartSec=3 diff --git a/services/cgApiBackend.service b/services/cgApiBackend.service index 8c5d7d2..b8fda5c 100644 --- a/services/cgApiBackend.service +++ b/services/cgApiBackend.service @@ -5,7 +5,7 @@ After=network.target [Service] User=root WorkingDirectory=/ -ExecStart=nohup cgApiBackend > /var/log/cgApiBackend.log & +ExecStart=nohup /opt/CodeGrader_venv/bin/cgApiBackend > /var/log/cgApiBackend.log & # optional items below Restart=always RestartSec=3 diff --git a/services/cgEvaluationService.service b/services/cgEvaluationService.service index 39fd480..e28bd99 100644 --- a/services/cgEvaluationService.service +++ b/services/cgEvaluationService.service @@ -5,7 +5,7 @@ After=network.target [Service] User=root WorkingDirectory=/ -ExecStart=nohup cgEvaluationService > /var/log/cgEvaluationService.log & +ExecStart=nohup /opt/CodeGrader_venv/bin/cgEvaluationService > /var/log/cgEvaluationService.log & # optional items below Restart=always RestartSec=3 diff --git a/services/cgExecutionService.service b/services/cgExecutionService.service index b419334..60149f2 100644 --- a/services/cgExecutionService.service +++ b/services/cgExecutionService.service @@ -5,7 +5,7 @@ After=network.target [Service] User=root WorkingDirectory=/ -ExecStart=nohup cgExecutionService > /var/log/cgExecutionService.log & +ExecStart=nohup /opt/CodeGrader_venv/bin/cgExecutionService > /var/log/cgExecutionService.log & # optional items below Restart=always RestartSec=3 diff --git a/services/cgUserFrontend.service b/services/cgUserFrontend.service index d4e62d5..a143868 100644 --- a/services/cgUserFrontend.service +++ b/services/cgUserFrontend.service @@ -5,7 +5,7 @@ After=network.target [Service] User=root WorkingDirectory=/ -ExecStart=nohup cgUserFrontend > /var/log/cgUserFrontend.log & +ExecStart=nohup /opt/CodeGrader_venv/bin/cgUserFrontend > /var/log/cgUserFrontend.log & # optional items below Restart=always RestartSec=3