add shell function
Browse files- startup.sh +16 -42
startup.sh
CHANGED
@@ -13,34 +13,15 @@ python3 -c "import torch; \
|
|
13 |
print(f\"device count = {torch.cuda.device_count()}\"); \
|
14 |
print(f\"current device = {torch.cuda.current_device()}\")"
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
echo "wait $COMPONENT to be running"
|
26 |
-
done
|
27 |
-
echo "$COMPONENT is running"
|
28 |
-
}
|
29 |
-
|
30 |
-
COMPONENT="serve.controller"
|
31 |
-
COMMAND=python3 -m $COMPONENT --host 0.0.0.0 --port 10000
|
32 |
-
READY_LOG="Uvicorn running on"
|
33 |
-
|
34 |
-
RUN_AND_WAIT $COMPONENT $COMMAND $READY_LOG
|
35 |
-
|
36 |
-
# COMPONENT="serve.controller"
|
37 |
-
# echo "Starting $COMPONENT"
|
38 |
-
# nohup python3 -m $COMPONENT --host 0.0.0.0 --port 10000 2>&1 | tee "$COMPONENT.log" &
|
39 |
-
# while [ `grep -c "Uvicorn running on" "$COMPONENT.log"` -eq '0' ];do
|
40 |
-
# sleep 1s;
|
41 |
-
# echo "wait $COMPONENT to be running"
|
42 |
-
# done
|
43 |
-
# echo "$COMPONENT is running"
|
44 |
|
45 |
|
46 |
# sleep 30
|
@@ -53,21 +34,14 @@ RUN_AND_WAIT $COMPONENT $COMMAND $READY_LOG
|
|
53 |
|
54 |
# echo "Starting prism-dinosiglip+7b"
|
55 |
# python3 -m interactive_demo --port 40000 --model_id prism-dinosiglip+7b &
|
56 |
-
|
57 |
COMPONENT="interactive_demo"
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
# nohup | tee "$COMPONENT.log" &
|
66 |
-
# while [ `grep -c "loaded prismatic prism-dinosiglip+7b" "$COMPONENT.log"` -eq '0' ];do
|
67 |
-
# sleep 1s;
|
68 |
-
# echo "wait $COMPONENT to be running"
|
69 |
-
# done
|
70 |
-
# echo "$COMPONENT is running"
|
71 |
|
72 |
|
73 |
|
|
|
13 |
print(f\"device count = {torch.cuda.device_count()}\"); \
|
14 |
print(f\"current device = {torch.cuda.current_device()}\")"
|
15 |
|
16 |
+
|
17 |
+
COMPONENT="serve.controller"
|
18 |
+
echo "Starting $COMPONENT"
|
19 |
+
nohup python3 -m $COMPONENT --host 0.0.0.0 --port 10000 2>&1 | tee "$COMPONENT.log" &
|
20 |
+
while [ `grep -c "Uvicorn running on" "$COMPONENT.log"` -eq '0' ];do
|
21 |
+
sleep 1s;
|
22 |
+
echo "wait $COMPONENT to be running"
|
23 |
+
done
|
24 |
+
echo "$COMPONENT is running"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
|
27 |
# sleep 30
|
|
|
34 |
|
35 |
# echo "Starting prism-dinosiglip+7b"
|
36 |
# python3 -m interactive_demo --port 40000 --model_id prism-dinosiglip+7b &
|
|
|
37 |
COMPONENT="interactive_demo"
|
38 |
+
echo "Starting $COMPONENT"
|
39 |
+
nohup python3 -m $COMPONENT --port 40000 --model_id prism-dinosiglip+7 | tee "$COMPONENT.log" &
|
40 |
+
while [ `grep -c "loaded prismatic prism-dinosiglip+7b" "$COMPONENT.log"` -eq '0' ];do
|
41 |
+
sleep 1s;
|
42 |
+
echo "wait $COMPONENT to be running"
|
43 |
+
done
|
44 |
+
echo "$COMPONENT is running"
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
|