Spaces:
Running
Running
File size: 1,832 Bytes
b474cbb c487c44 0d4153f 7989173 2efa79a 6c3c9e6 0d4153f 45bc919 3188e6e ec7361d 262dc68 ff13be7 f5ff97a 45bc919 3f0bf17 5930afc 6c3c9e6 687a95e 3188e6e 687a95e 5930afc 687a95e ac5ddf6 45bc919 3188e6e 45bc919 bfbd8c7 a992a66 45bc919 c487c44 3f0bf17 45bc919 c487c44 3f0bf17 2c67f45 3bf2de3 2c67f45 9e65ee6 3188e6e 9e65ee6 45bc919 |
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 |
#! /bin/bash
echo "#### startup.sh entered."
#echo "### ls -l /app"; ls -l /app
#echo "### ls -l /app/weaviate"; ls -l /app/weaviate
#echo "### ls -l /app/text2vec-transformers"; ls -l /app/text2vec-transformers
#echo "### ls -l /data"; ls -l /data
################################################
# Start tex2vec-transformers
echo "#### Before /app/text2vec-transformers"
/app/text2vec-transformers/bin/uvicorn app:app --host 0.0.0.0 --port 8081 --log-level debug --timeout-keep-alive 1440 &
#sleep 5
#echo "\n######## curl t2 "
#for (( ; ; )) do curl localhost:8081/vectors -H 'Content-Type: application/json' -d '{"text": "foo bar"}'; sleep 61; done &
###############################################
# Start the weaviate vector database server.
echo "#### Before /app/weaviate"
#echo "### pwd"; pwd
#echo "### ls -al ~"; ls -al ~
mkdir -p /data/var/lib/weaviate
chmod -R 777 /data/var/lib/weaviate
#echo "### ls -al ~"; ls -al ~
#ln -s ~/var/lib/weaviate /var/lib/weaviate
#echo "### ls -l /var/lib/weaviate"; ls -l /var/lib/weaviate
#echo "### ls -l /data"; ls -l /data
#echo "### ls -l /data/var/lib/weaviate"; ls -l /data/var/lib/weaviate
export AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
PERSISTENCE_DATA_PATH=/data/var/lib/weaviate \
DEFAULT_VECTORIZER_MODULE=text2vec-transformers \
ENABLE_MODULES=text2vec-transformers \
TRANSFORMERS_INFERENCE_API=http://127.0.0.1:8081 \
LOG_LEVEL=debug,
MODULES_CLIENT_TIMEOUT=600s
/app/weaviate/weaviate --host 127.0.0.1 --port 8080 --scheme http &
echo "#### Before sleep."
sleep 60
echo "#### Before /app/semsearch.py"
python /app/semsearch.py &
# Display timestamps.
for (( ; ; )) do date; sleep 60; done &
sleep 10
echo "#############################"
df -h
ls -al /data/var/lib/weaviate
ls -al /data/var/lib/weaviate/*
wait
|