Spaces:
Build error
Build error
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -1,14 +1,63 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
bash -c "$SSH_TUNNEL_CMD_1" &
|
| 4 |
bash -c "$SSH_TUNNEL_CMD_2" &
|
| 5 |
bash -c "$SSH_TUNNEL_CMD_3" &
|
| 6 |
bash -c "$SSH_TUNNEL_CMD_4" &
|
| 7 |
|
| 8 |
-
|
| 9 |
python -m starvector.serve.vllm_api_gradio.controller --host 0.0.0.0 --port 10000 &
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Configuraci贸n
|
| 4 |
+
MODEL_PATH="/home/agent_h/data/starvector-1b-im2svg"
|
| 5 |
+
CHAT_TEMPLATE="configs/chat-template.jinja"
|
| 6 |
+
MAX_MODEL_LEN=8192
|
| 7 |
+
|
| 8 |
+
# SSH Tunnels (opcionales)
|
| 9 |
bash -c "$SSH_TUNNEL_CMD_1" &
|
| 10 |
bash -c "$SSH_TUNNEL_CMD_2" &
|
| 11 |
bash -c "$SSH_TUNNEL_CMD_3" &
|
| 12 |
bash -c "$SSH_TUNNEL_CMD_4" &
|
| 13 |
|
| 14 |
+
# Controller
|
| 15 |
python -m starvector.serve.vllm_api_gradio.controller --host 0.0.0.0 --port 10000 &
|
| 16 |
+
|
| 17 |
+
# Esperar a que el controller inicie
|
| 18 |
+
sleep 5
|
| 19 |
+
|
| 20 |
+
# ====== A脩ADIR ESTOS COMANDOS - Iniciar servidores vLLM ======
|
| 21 |
+
echo "Iniciando servidores vLLM..."
|
| 22 |
+
|
| 23 |
+
vllm serve $MODEL_PATH \
|
| 24 |
+
--chat-template $CHAT_TEMPLATE \
|
| 25 |
+
--trust-remote-code \
|
| 26 |
+
--port 8000 \
|
| 27 |
+
--max-model-len $MAX_MODEL_LEN &
|
| 28 |
+
|
| 29 |
+
vllm serve $MODEL_PATH \
|
| 30 |
+
--chat-template $CHAT_TEMPLATE \
|
| 31 |
+
--trust-remote-code \
|
| 32 |
+
--port 8001 \
|
| 33 |
+
--max-model-len $MAX_MODEL_LEN &
|
| 34 |
+
|
| 35 |
+
vllm serve $MODEL_PATH \
|
| 36 |
+
--chat-template $CHAT_TEMPLATE \
|
| 37 |
+
--trust-remote-code \
|
| 38 |
+
--port 8002 \
|
| 39 |
+
--max-model-len $MAX_MODEL_LEN &
|
| 40 |
+
|
| 41 |
+
vllm serve $MODEL_PATH \
|
| 42 |
+
--chat-template $CHAT_TEMPLATE \
|
| 43 |
+
--trust-remote-code \
|
| 44 |
+
--port 8003 \
|
| 45 |
+
--max-model-len $MAX_MODEL_LEN &
|
| 46 |
+
|
| 47 |
+
# Esperar a que vLLM inicie (puede tardar varios minutos)
|
| 48 |
+
echo "Esperando a que vLLM cargue el modelo (esto puede tardar 2-3 minutos)..."
|
| 49 |
+
sleep 180
|
| 50 |
+
|
| 51 |
+
# ====== FIN DE LA MODIFICACI脫N ======
|
| 52 |
+
|
| 53 |
+
# Model Workers
|
| 54 |
+
python -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-name $MODEL_PATH --vllm-base-url http://localhost:8000 &
|
| 55 |
+
|
| 56 |
+
python -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40001 --worker http://localhost:40001 --model-name $MODEL_PATH --vllm-base-url http://localhost:8001 &
|
| 57 |
+
|
| 58 |
+
python -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40002 --worker http://localhost:40002 --model-name $MODEL_PATH --vllm-base-url http://localhost:8002 &
|
| 59 |
+
|
| 60 |
+
python -m starvector.serve.vllm_api_gradio.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40003 --worker http://localhost:40003 --model-name $MODEL_PATH --vllm-base-url http://localhost:8003 &
|
| 61 |
+
|
| 62 |
+
# Gradio Web Server
|
| 63 |
+
python -m starvector.serve.vllm_api_gradio.gradio_web_server --controller http://localhost:10000 --model-list-mode reload --port 7860
|