-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun.sh
60 lines (55 loc) · 1.57 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
export MODEL_CKPT_PATH="./models" # models 폴더의 경로를 입력해주세요
export LLM_PATH=$MODEL_CKPT_PATH/llm
export EMB_KO_PATH=$MODEL_CKPT_PATH/embedding_ko
export EMB_EN_PATH=$MODEL_CKPT_PATH/embedding_en
# Don't change except STREAMLIT_PORT
export LLM_PORT=40101
export STREAMLIT_PORT=40102
export SEARCH_PORT=40103
export HWP_PORT=40104
# LLM Serving(Huggingface TGI)
docker run -d \
--name llm_serving \
--restart unless-stopped \
--gpus all \
-p $LLM_PORT:80 \
-v $LLM_PATH:/model \
ghcr.io/huggingface/text-generation-inference:1.1.1 \
--model-id /model \
--dtype bfloat16 \
--max-input-length 3072 \
--max-total-tokens 4096 \
--hostname 0.0.0.0 \
--port 80 \
--rope-scaling dynamic
# Neural Search Engine
docker build -t neural_search:0.1.0 \
-f ./neural_search/Dockerfile \
./neural_search
docker run -d \
--name neural_search \
--restart unless-stopped \
--gpus all \
-p $SEARCH_PORT:80 \
-v $EMB_EN_PATH:/embedding_en \
-v $EMB_KO_PATH:/embedding_ko \
-v ./chroma:/chroma \
neural_search:0.1.0
# HWP to text converter
docker run -d \
--name hwp-converter \
--restart unless-stopped \
-p $HWP_PORT:80 \
vkehfdl1/hwp-converter-api:1.0.0
# Streamlit user interface
docker build -t streamlit_app:0.1.0 \
-f ./streamlit_app/Dockerfile \
./streamlit_app
docker run -d \
--name streamlit_app \
--restart unless-stopped \
-e STREAMLIT_SERVER_PORT=$STREAMLIT_PORT \
-v ./files:/files \
-v ./webpages:/webpages \
--net host \
streamlit_app:0.1.0