forked from claritylab/lucida
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1e7baa
commit e8fdd4d
Showing
14 changed files
with
160 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ config | |
.DS_STORE | ||
inputs | ||
models | ||
|
||
certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -e certs/server.key ] || [ ! -e certs/server.crt ]; then | ||
|
||
mkdir certs | ||
cd certs/ | ||
|
||
# Generate a private key | ||
openssl genrsa -des3 -out server.key 1024 | ||
|
||
# Generate a CSR | ||
openssl req -new -key server.key -out server.csr | ||
|
||
# Remove passphrase from key | ||
cp server.key server.key.org | ||
openssl rsa -in server.key.org -out server.key | ||
rm server.key.org | ||
|
||
# Generate a self signed certificate | ||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | ||
rm server.csr | ||
|
||
cd .. | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
export GST_PLUGIN_PATH=$(pwd)/kaldi/tools/gst-kaldi-nnet2-online/src | ||
|
||
gnome-terminal -x bash -c "python kaldigstserver/worker.py -u ws://localhost:8081/worker/ws/speech -c sample_english_nnet2.yaml; read -n1" | ||
python kaldigstserver/worker.py -u ${ASR_ADDR_PORT}/worker/ws/speech -c sample_english_nnet2.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to start all of the microservices | ||
# for the Lucida project by creating a tmux window for each | ||
# server in the background. | ||
# Example calls: | ||
# $./start_all_tmux.sh secure | ||
# $./start_all_tmux.sh | ||
# To attach to the tmux session | ||
# use the following command: | ||
# $tmux a -t lucida | ||
|
||
SESSION_NAME="lucida" | ||
|
||
# Check if session already exists | ||
tmux has-session -t ${SESSION_NAME} | ||
if [ $? -eq 0 ]; then | ||
echo "Session ${SESSION_NAME} already exists." | ||
exit 0; | ||
elif [ -n "$TMUX" ]; then | ||
echo "Already in a tmux session" | ||
exit 0; | ||
else | ||
echo "Session ${SESSION_NAME} does not exit. Creating a ${SESSION_NAME} session." | ||
fi | ||
|
||
# Check to see if we should run on http/ws (non-secure) or https/wss (secure) | ||
if [ "$1" == "secure" ]; then | ||
echo "Enabling secure host" | ||
# Getting the host IP address | ||
export ASR_ADDR_PORT="wss://$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'):8081" | ||
export SECURE_HOST=true | ||
|
||
# Generate self-signed certificates | ||
cd $(pwd)/../lucida/commandcenter/ | ||
chmod +x gen_certs.sh | ||
./gen_certs.sh | ||
cd $(pwd)/../../tools | ||
else | ||
echo "Enabling non-secure host" | ||
export ASR_ADDR_PORT="ws://localhost:8081" | ||
fi | ||
|
||
declare -a commandcenter=("CMD" "$(pwd)/../lucida/commandcenter/") | ||
declare -a questionanswering=("QA" "$(pwd)/../lucida/questionanswering/OpenEphyra/") | ||
declare -a imagematching=("IMM" "$(pwd)/../lucida/imagematching/opencv_imm/") | ||
declare -a calendar=("CA" "$(pwd)/../lucida/calendar/") | ||
declare -a speechrecognition=("ASR" "$(pwd)/../lucida/speechrecognition/kaldi_gstreamer_asr/") | ||
declare -a imageclassification=("IMC" "$(pwd)/../lucida/djinntonic/imc/") | ||
declare -a digitrecognition=("DIG" "$(pwd)/../lucida/djinntonic/dig/") | ||
declare -a facerecognition=("FACE" "$(pwd)/../lucida/djinntonic/face") | ||
|
||
declare -a services=( | ||
commandcenter | ||
questionanswering | ||
imagematching | ||
calendar | ||
speechrecognition | ||
imageclassification | ||
digitrecognition | ||
facerecognition) | ||
|
||
# Create the session | ||
tmux new-session -s ${SESSION_NAME} -d | ||
|
||
# Create the service windows | ||
TMUX_WIN=0 | ||
for i in "${services[@]}" | ||
do | ||
NAME=$i[0] | ||
SERV_PATH=$i[1] | ||
if [ $TMUX_WIN == 0 ]; then | ||
tmux rename-window -t ${SESSION_NAME}:$TMUX_WIN ${!NAME} | ||
else | ||
tmux new-window -n ${!NAME} -t ${SESSION_NAME} | ||
fi | ||
tmux send-keys -t ${SESSION_NAME}:$TMUX_WIN "cd ${!SERV_PATH}" C-m | ||
tmux send-keys -t ${SESSION_NAME}:$TMUX_WIN "make start_server" C-m | ||
((TMUX_WIN++)) | ||
done | ||
|
||
# Start out on the first window when we attach | ||
tmux select-window -t ${SESSION_NAME}:0 | ||
|