File size: 2,693 Bytes
8333668 653bb2f 46a86c9 653bb2f 71b2874 52494dd 387fdbf bc2999d d3d1749 c10e90a 07a246c 4f68ff6 d3d1749 c7977b2 a87320f 062a3e1 21ed67c 062a3e1 fbe0301 3a39a5c 4490c79 35dbef9 4f68ff6 3a39a5c 4490c79 3a39a5c 4490c79 3a39a5c fbe0301 3a39a5c fbe0301 3a39a5c 4d27f4c 4490c79 4f68ff6 46a86c9 157fd87 092b6ff a2ea222 |
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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
#!/bin/bash
export HF_HOME="/data/.huggingface"
echo "PWD: $(pwd)"
echo $HF_TOKEN > .hf_token
echo "LS: $(ls -als)"
while true; do nvidia-smi; sleep 600; done &
python3 -c "import torch; \
print(f\"is availeble = {torch.cuda.is_available()}\"); \
print(f\"device count = {torch.cuda.device_count()}\"); \
print(f\"current device = {torch.cuda.current_device()}\")"
COMPONENT="serve.controller"
echo "Starting $COMPONENT"
nohup python3 -m serve.controller --host 0.0.0.0 --port 10000 2>&1 | tee serve.controller.log &
while [ `grep -c "Uvicorn running on" serve.controller.log` -eq '0' ];do
sleep 2s;
echo "waiting for $COMPONENT to be running"
done
echo "$COMPONENT is running."
# stuck after download config.json
# COMPONENT="interactive_demo prism-dinosiglip+13b"
# echo "Starting $COMPONENT"
# nohup python3 -m interactive_demo --port 40000 --model_id prism-dinosiglip+13b | tee prism-dinosiglip_13b.log &
# while [ `grep -c "loaded prismatic prism-dinosiglip+13b" prism-dinosiglip_13b.log` -eq '0' ];do
# sleep 10s;
# echo "waiting for $COMPONENT to be running"
# done
# echo "$COMPONENT is running"
#works!
COMPONENT1="interactive_demo prism-dinosiglip_7b"
echo "Starting $COMPONENT1"
CUDA_VISIBLE_DEVICES=0 nohup python3 -m interactive_demo --port 40001 --model_id prism-dinosiglip+7b | tee prism-dinosiglip_7b.log &
#works!
COMPONENT2="interactive_demo prism-dinosiglip-controlled+7b"
echo "Starting $COMPONENT2"
CUDA_VISIBLE_DEVICES=1 nohup python3 -m interactive_demo --port 40002 --model_id prism-dinosiglip-controlled+7b | tee prism-dinosiglip-controlled_7b.log &
#works!
COMPONENT3="interactive_demo llava-v1.5-7b"
echo "Starting $COMPONENT3"
CUDA_VISIBLE_DEVICES=2 nohup python3 -m interactive_demo --port 40003 --model_family llava-v15 --model_id llava-v1.5-7b --model_dir liuhaotian/llava-v1.5-7b | tee llava-v1.5-7b.log &
while [ `grep -c "loaded prismatic prism-dinosiglip+7b" prism-dinosiglip_7b.log` -eq '0' ];do
sleep 10s;
echo "waiting for $COMPONENT1 to be running"
done
echo "$COMPONENT1 is running."
while [ `grep -c "loaded prismatic prism-dinosiglip-controlled+7b" prism-dinosiglip-controlled_7b.log` -eq '0' ];do
sleep 10s;
echo "waiting for $COMPONENT2 to be running"
done
echo "$COMPONENT2 is running"
while [ `grep -c "loaded llava llava-v1.5-7b" llava-v1.5-7b.log` -eq '0' ];do
sleep 10s;
echo "waiting for $COMPONENT3 to be running"
done
echo "$COMPONENT3 is running"
ls -als $HF_HOME
tree --du -h $HF_HOME
echo "Starting serve.gradio_web_server"
python3 -m serve.gradio_web_server --controller http://127.0.0.1:10000 --model-list-mode reload # --share |