Adjust the directory structure to prepare for merging into Master.

This commit is contained in:
Liu Zhicong
2023-09-27 11:40:46 -07:00
parent 5146bc1871
commit 030e4c4f52
115 changed files with 413 additions and 160 deletions
@@ -0,0 +1,9 @@
[program:demo_service1]
command=bash /root/jarvis/supervisor.d/demo_service1.sh
priority=1
autostart=true
autorestart=true
stdout_logfile=/root/jarvis/supervisor_log/demo_service1_stdout.log
stdout_logfile_maxbytes=4MB
stderr_logfile=/root/jarvis/supervisor_log/demo_service1_stderr.log
stderr_logfile_maxbytes=4MB
@@ -0,0 +1,15 @@
#!/bin/bash
set -eux
CURRENT_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_ROOT_DIR=$( dirname -- "${CURRENT_SCRIPT_DIR}" )
cd "${PROJECT_ROOT_DIR}"
# https://stackoverflow.com/questions/61915607/commandnotfounderror-your-shell-has-not-been-properly-configured-to-use-conda
source /root/miniconda3/etc/profile.d/conda.sh
conda activate jarvis
cd "${PROJECT_ROOT_DIR}/../example_services/demo_service1"
exec python -m uvicorn main:app --port=1999
@@ -0,0 +1,9 @@
[program:demo_service2]
command=bash /root/jarvis/supervisor.d/demo_service2.sh
priority=1
autostart=true
autorestart=true
stdout_logfile=/root/jarvis/supervisor_log/demo_service2_stdout.log
stdout_logfile_maxbytes=4MB
stderr_logfile=/root/jarvis/supervisor_log/demo_service2_stderr.log
stderr_logfile_maxbytes=4MB
@@ -0,0 +1,15 @@
#!/bin/bash
set -eux
CURRENT_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_ROOT_DIR=$( dirname -- "${CURRENT_SCRIPT_DIR}" )
cd "${PROJECT_ROOT_DIR}"
# https://stackoverflow.com/questions/61915607/commandnotfounderror-your-shell-has-not-been-properly-configured-to-use-conda
source /root/miniconda3/etc/profile.d/conda.sh
conda activate jarvis
cd "${PROJECT_ROOT_DIR}/../example_services/demo_service2"
exec python -m uvicorn main:app --port=1998
@@ -0,0 +1,8 @@
#!/bin/bash
set -eux
mkdir /var/core -p
mkdir /root/jarvis/supervisor_log -p
exec supervisord -c /etc/supervisord.conf -n
+9
View File
@@ -0,0 +1,9 @@
[program:jarvis]
command=bash /root/jarvis/supervisor.d/jarvis.sh
priority=1
autostart=true
autorestart=true
stdout_logfile=/root/jarvis/supervisor_log/jarvis_stdout.log
stdout_logfile_maxbytes=4MB
stderr_logfile=/root/jarvis/supervisor_log/jarvis_stderr.log
stderr_logfile_maxbytes=4MB
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -eux
CURRENT_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_ROOT_DIR=$( dirname -- "${CURRENT_SCRIPT_DIR}" )
cd "${PROJECT_ROOT_DIR}"
echo "${PROJECT_ROOT_DIR}"
# https://stackoverflow.com/questions/61915607/commandnotfounderror-your-shell-has-not-been-properly-configured-to-use-conda
source /root/miniconda3/etc/profile.d/conda.sh
conda activate jarvis
exec python -m jarvis.main