+15
hooks.sh
+15
hooks.sh
···
4
4
cd ./smart-modules/construct-post-uri/ && smdk build && smdk load
5
5
cd -
6
6
kind load docker-image loaded-pg:$POSTGRES_VERSION
7
+
8
+
echo "Checking if the embeddings-server is running at port 8080"
9
+
if ! curl -s -o /dev/null localhost:8080; then
10
+
echo "Starting TEI"
11
+
export model=jinaai/jina-embeddings-v2-base-en
12
+
text-embeddings-router --model-id $model --port 8080 --auto-truncate &
13
+
14
+
# Wait until the service is up
15
+
while ! curl -s -o /dev/null localhost:8080; do
16
+
echo "Waiting for TEI to start..."
17
+
sleep 2
18
+
done
19
+
20
+
echo "TEI is up!"
21
+
fi