<commit_before>#!/bin/bash
set -x
export REDIS_HOST=$(hostname -i)

cd /ppml/trusted-realtime-ml/redis
export SGX_MEM_SIZE=16G
test "$SGX_MODE" = sgx && ./init-redis.sh
echo "redis initiated"


cd /ppml/trusted-realtime-ml/java
export SGX_MEM_SIZE=32G
test "$SGX_MODE" = sgx && ./init-java.sh
echo "java initiated"


export REDIS_HOST=redis-service
./init-cluster-serving.sh
echo "cluster serving initiated"


cd /ppml/trusted-realtime-ml/redis
./start-redis.sh &


while ! nc -z $REDIS_HOST $REDIS_PORT; do
  sleep 5
done
echo "redis started"


cd ../java
./start-http-frontend.sh &
echo "http-frontend started"


while ! nc -z $LOCAL_IP 10020; do
  sleep 1
done
./start-cluster-serving-job.sh &
echo "cluster-serving-job started"


bash /ppml/trusted-realtime-ml/check-status.sh
<commit_msg>[PPML] Minor fixes in scripts (#4662)<commit_after>#!/bin/bash
set -x

cd /ppml/trusted-realtime-ml/redis
export SGX_MEM_SIZE=16G
test "$SGX_MODE" = sgx && ./init.sh
echo "redis initiated"


cd /ppml/trusted-realtime-ml/java
export SGX_MEM_SIZE=32G
test "$SGX_MODE" = sgx && ./init.sh
echo "java initiated"


export REDIS_HOST=redis-service
./init-cluster-serving.sh
echo "cluster serving initiated"


cd /ppml/trusted-realtime-ml/redis
./start-redis.sh &


while ! nc -z $REDIS_HOST $REDIS_PORT; do
  sleep 5
done
echo "redis started"


cd ../java
./start-http-frontend.sh &
echo "http-frontend started"


while ! nc -z $LOCAL_IP 10020; do
  sleep 1
done
./start-cluster-serving-job.sh &
echo "cluster-serving-job started"


bash /ppml/trusted-realtime-ml/check-status.sh

{'fraction_non_alphanumeric': 0.13793103448275862, 'fraction_numerical': 0.016602809706257982, 'mean_word_length': 3.8364197530864197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '684378', 'n_tokens_mistral': 675, 'n_tokens_neox': 614, 'n_words': 144}