You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/AristoteAPI_Workers_guide.md
+22-12
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Quiz generation worker
2
2
3
-
First, make sure that you have an **llm-model** container :
3
+
First, make sure that you have an **llm-model** container (not needed for quiz generation using Aristote Dispatcher):
4
4
5
5
```
6
6
docker ps -a
@@ -12,26 +12,26 @@ If not, run this command
12
12
docker run --runtime nvidia --gpus all —name llm-model -v ~/.cache/huggingface:/root/.cache/huggingface -p 8000:8000 --ipc=host vllm/vllm-openai:v0.2.4 --model teknium/OpenHermes-2.5-Mistral-7B --dtype float16 --tensor-parallel-size 1
13
13
```
14
14
15
-
After a new Quiz Generation build with tag, these are the steps to follow on the Worker machine (**Note** : quiz-gen folder contains .env file necessary for running the docker container, you can make necessary changes if needed):
15
+
After a new Quiz Generation build with tag, these are the steps to follow on the Worker machine for prod environment for example (**Note** : quiz-gen folder contains .env.prod file necessary for running the docker container, you can make necessary changes if needed):
To start process of getting a job from AristoteAPI and generating the quiz (assuming quiz-generator container and the llm-model container are running):
This script can be used to handle switching on the llm-model container, waiting till it's responsive, then start the previous command, while taking into account a maximum number of parallel jobs :
@@ -51,15 +51,15 @@ docker save -o whisper.tar whisperapi-whisper
These are the steps to follow on the Worker machine (**Note** : transcription folder contains .env file necessary for running the docker container, you can make necessary changes if needed):
54
+
These are the steps to follow on the Worker machine (**Note** : transcription folder contains .env file necessary for running the docker container and the .env.preprod/.env.prod for the appropriate Aristote URL and credentials to be used, you can make necessary changes if needed):
55
55
56
56
```
57
57
cd transcription
58
58
docker stop whisper
59
59
docker rm whisper
60
60
docker image rm whisperapi-whisper
61
61
docker load -i whisper.tar
62
-
docker run --runtime nvidia --gpus all --env-file .env -p 3001:3000 --name whisper whisperapi-whisper
62
+
docker run --runtime nvidia --gpus all --env-file .env -p 3001:3000 -v {MODEL_FOLDER_PATH}:/server_app/custom_model -v ./.env.prod:/server_app/.env.prod -v ./.env.preprod:/server_app/.env.preprod --name whisper whisperapi-whisper
63
63
```
64
64
65
65
or simply (inside transcription folder):
@@ -71,7 +71,13 @@ or simply (inside transcription folder):
71
71
To start the process of getting a job from AristoteAPI and transcribing the media (assuming whisper container and the whisper container are running):
This script can be used to handle switching on the whisper container, waiting till it's responsive, then start the previous command, while taking into account a maximum number of parallel jobs :
@@ -90,7 +96,6 @@ To start the process of getting a job from AristoteAPI and evaluating a quiz
There is **schedule.sh** that is run as a cron job and it handles the scheduling of quiz generation/transcription workers using **transcription-cron-job.sh** and
103
108
**quiz-generation-cron-job.sh** because there is not enough VRAM from them to run simultaneously.
104
109
110
+
111
+
**evaluation-cron-job.sh** that is run as a separate cron job since it doesn't interfere with the other workers.
112
+
113
+
**quiz-generation-dispatcher-cron-job.sh** handles the quiz generation using Aristote Dispatcher, so no local LLM is needed.
114
+
105
115
There is also **evaluation-cron-job.sh** that is run as a separate cron job since it doesn't interfere with the other workers.
0 commit comments