Skip to content

Commit 603c6df

Browse files
committed
[fix] model pull simplification
1 parent 1efd508 commit 603c6df

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

scripts/entrypoint.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,16 @@ if [ "$APP_TYPE" = "celery" ]; then
2121
echo "Starting Celery worker..."
2222
exec celery -A text_extract_api.celery_app worker --loglevel=info --pool=solo
2323
else
24+
echo "Pulling LLM models, please wait until this process is done..."
25+
python client/cli.py llm_pull --model llama3.1
26+
python client/cli.py llm_pull --model llama3.2-vision
27+
echo "LLM models are ready!"
28+
2429
echo "Starting FastAPI app..."
25-
pid=''
30+
2631
if [ "$APP_ENV" = "production" ]; then
2732
exec uvicorn text_extract_api.main:app --host 0.0.0.0 --port 8000 &
28-
pid=$!
2933
else
3034
exec uvicorn text_extract_api.main:app --host 0.0.0.0 --port 8000 --reload &
31-
pid=$!
3235
fi
33-
34-
sleep 5
35-
36-
echo "Pulling LLM models, please wait until this process is done..."
37-
exec python client/cli.py llm_pull --model llama3.1
38-
exec python client/cli.py llm_pull --model llama3.2-vision
39-
echo "LLM models are ready!"
40-
41-
wait $pid
4236
fi

0 commit comments

Comments
 (0)