File size: 1,286 Bytes
3882e3f
 
2430b06
 
 
 
 
543acbd
 
3882e3f
a463554
 
2430b06
f65c073
18a3a1b
dd2c5c9
 
 
3882e3f
 
 
197ae45
e9a6bd5
197ae45
3882e3f
 
 
 
 
 
dd2c5c9
3882e3f
 
 
d833c00
3882e3f
e9a6bd5
3882e3f
b29ccb2
 
3882e3f
 
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
#! /bin/bash 

#####################################
# Start text2vec-transformers and   #
# Weaviate DB to run asynchronously #
# and wait.                         #
#####################################
exec &> /app/startup.log

echo "#### startup.sh entered."


# Make sure Weaviate DB directory exists.
echo "### Before mkdir -p ~/data/var/lib/weaviate"
weaviateDir=~/data/var/lib/weaviate
mkdir -p $weaviateDir
chmod -R 777 $weaviateDir


# Start tex2vec-transformers
echo "#### Before /app/text2vec-transformers"
cd /app/text2vec-transformers
/app/text2vec-transformers/bin/uvicorn app:app --host 0.0.0.0 --port 8081 --log-level warning --timeout-keep-alive 1440 &  #2>& 1 | tee /data/var/lib/weaviate/t2v.log &
cd /app


# Start the weaviate vector database server.
echo "#### Before /app/weaviate"

export AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
       PERSISTENCE_DATA_PATH=$weaviateDir \
       DEFAULT_VECTORIZER_MODULE=text2vec-transformers \
	   ENABLE_MODULES=text2vec-transformers \
	   TRANSFORMERS_INFERENCE_API=http://127.0.0.1:8081 \
	   LOG_LEVEL=warning \
       MODULES_CLIENT_TIMEOUT=600s
/app/weaviate/weaviate --host 127.0.0.1 --port 8080 --scheme http --write-timeout 600s &  #2>& 1 | tee /data/var/lib/weaviate/ws.log &

echo "### Before wait."
wait