Spaces:
Runtime error
Runtime error
Update entrypoint.sh
Browse files- entrypoint.sh +19 -33
entrypoint.sh
CHANGED
|
@@ -1,36 +1,22 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
}
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
echo "Starting text-generation-inference server..."
|
| 20 |
-
text-generation-launcher --model-id ${MODEL_NAME} --num-shard 1 --port 8080 --disable-custom-kernels --max-batch-prefill-tokens 4096 &
|
| 21 |
-
|
| 22 |
-
# Wait for text-generation-inference to start
|
| 23 |
-
until check_port 8080; do
|
| 24 |
-
echo "Waiting for text-generation-inference to start on port 8080..."
|
| 25 |
-
sleep 5
|
| 26 |
-
done
|
| 27 |
-
|
| 28 |
-
# Start the chat-ui process
|
| 29 |
-
echo "Starting Chat UI..."
|
| 30 |
-
dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port ${PORT}
|
| 31 |
-
|
| 32 |
-
# Wait for any process to exit
|
| 33 |
wait -n
|
| 34 |
|
| 35 |
-
|
| 36 |
exit $?
|
|
|
|
| 1 |
+
mkdir -p /data/db
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
find /data/db -name "*.lock" -type f -exec rm -f {} ;
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
mongod &
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
text-generation-launcher --model-id ${MODEL_NAME} --num-shard 1 --port 8080 --trust-remote-code &
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
curl --retry 60 --retry-delay 10 --retry-connrefused http://127.0.0.1:8080/health
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
dotenv -e /app/.env -c -- node /app/build/index.js -- --host 0.0.0.0 --port 3000
|
| 17 |
+
|
| 18 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
wait -n
|
| 20 |
|
| 21 |
+
|
| 22 |
exit $?
|